Commit 2a56b11c authored by Denis Bilenko's avatar Denis Bilenko

make shutdown() work on Python 2.4

parent 8ad19287
...@@ -489,13 +489,16 @@ class Hub(object): ...@@ -489,13 +489,16 @@ class Hub(object):
try: try:
get_hub().switch() get_hub().switch()
except DispatchExit, ex: except DispatchExit, ex:
if ex.message == 1: if ex.code == 1:
return return
raise raise
class DispatchExit(Exception): class DispatchExit(Exception):
pass
def __init__(self, code):
self.code = code
Exception.__init__(self, code)
def _wait_helper(ev, evtype): def _wait_helper(ev, evtype):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment