websocketproxy.py: better missing token exception.

This commit is contained in:
Joel Martin 2012-10-29 17:05:23 -05:00
parent 66d772a6bc
commit d1458d0063
1 changed files with 1 additions and 1 deletions

View File

@ -205,7 +205,7 @@ Traffic Legend:
# Extract the token parameter 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")
token = args['token'][0].rstrip('\n')