Avoid UnboundLocalError for exc
Previously exc was set only when an exception occurs in the inner try (the one contains call to self.poll), so an error in the other part causes an UnboundLocalError.
This commit is contained in:
parent
558a6439f1
commit
42bf1a30e3
|
|
@ -1047,6 +1047,7 @@ class WebSocketServer(object):
|
|||
self.msg("In exit")
|
||||
break
|
||||
except Exception:
|
||||
_, exc, _ = sys.exc_info()
|
||||
self.msg("handler exception: %s", str(exc))
|
||||
self.vmsg("exception", exc_info=True)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue