Some minor fixes and cleanups.

This commit is contained in:
Griatch 2016-09-14 23:27:55 +02:00
parent 07944918f7
commit 4a97a05c10
3 changed files with 3 additions and 4 deletions

View file

@ -320,7 +320,7 @@ class PortalSessionHandler(SessionHandler):
""" """
return [sess for sess in self.get_sessions(include_unloggedin=True) return [sess for sess in self.get_sessions(include_unloggedin=True)
if hasattr(sess, 'csessid') and sess.csessid == csessid] if hasattr(sess, 'csessid') and sess.csessid and sess.csessid == csessid]
def announce_all(self, message): def announce_all(self, message):
""" """

View file

@ -93,7 +93,6 @@ class WebSocketClient(Protocol, Session):
self.sessionhandler.disconnect(self) self.sessionhandler.disconnect(self)
self.transport.close() self.transport.close()
def dataReceived(self, string): def dataReceived(self, string):
""" """
Method called when data is coming in over the websocket Method called when data is coming in over the websocket
@ -128,7 +127,7 @@ class WebSocketClient(Protocol, Session):
Notes: Notes:
At initilization, the client will send the special At initilization, the client will send the special
'csessid' command to identify its browser session hash 'csessid' command to identify its browser session hash
with the Evennia side. witherthe Evennia side.
The websocket client will also pass 'websocket_close' command The websocket client will also pass 'websocket_close' command
to report that the client has been closed and that the to report that the client has been closed and that the

View file

@ -28,7 +28,7 @@ class CaseInsensitiveModelBackend(ModelBackend):
return autologin return autologin
else: else:
# In this case .backend will be assigned automatically # In this case .backend will be assigned automatically
# somewhere along the # way. # somewhere along the way.
Player = get_user_model() Player = get_user_model()
try: try:
player = Player.objects.get(username__iexact=username) player = Player.objects.get(username__iexact=username)