Handle AttributeError in webclient protocol
This commit is contained in:
parent
64acd33d85
commit
e130ec2d6f
2 changed files with 6 additions and 2 deletions
|
|
@ -23,7 +23,7 @@ Update to Python 3
|
||||||
|
|
||||||
### Web
|
### 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)
|
#### New golden-layout based Webclient UI (@friarzen)
|
||||||
- Features
|
- Features
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,11 @@ class WebSocketClient(WebSocketServerProtocol, Session):
|
||||||
# browser session.
|
# browser session.
|
||||||
self.csessid = None
|
self.csessid = None
|
||||||
return None
|
return None
|
||||||
|
except AttributeError:
|
||||||
|
from evennia.utils import logger
|
||||||
|
self.csessid = None
|
||||||
|
logger.log_trace(str(self))
|
||||||
|
return None
|
||||||
if self.csessid:
|
if self.csessid:
|
||||||
return _CLIENT_SESSIONS(session_key=self.csessid)
|
return _CLIENT_SESSIONS(session_key=self.csessid)
|
||||||
|
|
||||||
|
|
@ -68,7 +73,6 @@ class WebSocketClient(WebSocketServerProtocol, Session):
|
||||||
from evennia.utils import logger
|
from evennia.utils import logger
|
||||||
try:
|
try:
|
||||||
csessid = self.http_request_uri.split("?", 1)[1]
|
csessid = self.http_request_uri.split("?", 1)[1]
|
||||||
logger.log_msg("csessid: ", csessid)
|
|
||||||
except Exception:
|
except Exception:
|
||||||
logger.log_trace(str(self.__dict__))
|
logger.log_trace(str(self.__dict__))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue