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. Closes #178
This commit is contained in:
parent
b445296816
commit
f693871c58
|
@ -1047,6 +1047,7 @@ class WebSocketServer(object):
|
|||
self.msg("In exit")
|
||||
break
|
||||
except Exception:
|
||||
exc = sys.exc_info()[1]
|
||||
self.msg("handler exception: %s", str(exc))
|
||||
self.vmsg("exception", exc_info=True)
|
||||
|
||||
|
|
Loading…
Reference in New Issue