Skip to content

Commit

Permalink
Avoid UnboundLocalError for exc
Browse files Browse the repository at this point in the history
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
  • Loading branch information
no2a authored and DirectXMan12 committed Aug 27, 2015
1 parent b445296 commit f693871
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions websockify/websocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -1047,6 +1047,7 @@ def start_server(self):
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)

Expand Down

0 comments on commit f693871

Please sign in to comment.