Handle AttributeError in webclient protocol

This commit is contained in:
Griatch 2019-05-31 08:42:33 +02:00
parent 64acd33d85
commit e130ec2d6f
2 changed files with 6 additions and 2 deletions

View file

@ -23,7 +23,7 @@ Update to Python 3
### Web
- Change webclient to use Autobahn websocket library (which is actually maintained)
- Change webclient from old txws version to use more supported/feature-rich Autobahn websocket library
#### New golden-layout based Webclient UI (@friarzen)
- Features

View file

@ -53,6 +53,11 @@ class WebSocketClient(WebSocketServerProtocol, Session):
# browser session.
self.csessid = None
return None
except AttributeError:
from evennia.utils import logger
self.csessid = None
logger.log_trace(str(self))
return None
if self.csessid:
return _CLIENT_SESSIONS(session_key=self.csessid)
@ -68,7 +73,6 @@ class WebSocketClient(WebSocketServerProtocol, Session):
from evennia.utils import logger
try:
csessid = self.http_request_uri.split("?", 1)[1]
logger.log_msg("csessid: ", csessid)
except Exception:
logger.log_trace(str(self.__dict__))