websocketproxy.py: better missing token exception.
This commit is contained in:
parent
66d772a6bc
commit
d1458d0063
|
|
@ -205,7 +205,7 @@ Traffic Legend:
|
||||||
# Extract the token parameter from url
|
# Extract the token parameter from url
|
||||||
args = parse_qs(urlparse(path)[4]) # 4 is the query from url
|
args = parse_qs(urlparse(path)[4]) # 4 is the query from url
|
||||||
|
|
||||||
if not len(args['token']):
|
if not args.has_key('token') or not len(args['token']):
|
||||||
raise self.EClose("Token not present")
|
raise self.EClose("Token not present")
|
||||||
|
|
||||||
token = args['token'][0].rstrip('\n')
|
token = args['token'][0].rstrip('\n')
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue