]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Catch `binascii.a2b_hex` errors on Python 3 1097/head
authorWilliam Tisäter <william@defunct.cc>
Tue, 8 Jul 2014 13:52:25 +0000 (15:52 +0200)
committerWilliam Tisäter <william@defunct.cc>
Tue, 8 Jul 2014 13:52:25 +0000 (15:52 +0200)
tornado/web.py

index 11dab74f9c54bfafddb026a171e363fafa77efa0..a0285a4cf653ae190c993fd19ed9e78b27ad72db 100644 (file)
@@ -1144,7 +1144,7 @@ class RequestHandler(object):
             version = 1
             try:
                 token = binascii.a2b_hex(utf8(cookie))
-            except TypeError:
+            except (binascii.Error, TypeError):
                 token = utf8(cookie)
             # We don't have a usable timestamp in older versions.
             timestamp = int(time.time())