mirror of
https://github.com/sshuttle/sshuttle.git
synced 2024-11-29 03:14:20 +01:00
Don't use try/except/finally so that python 2.4 works.
Use try/(try/except)/finally instead. There was only once case of this. Thanks to Wayne Scott and nisc for pointing this out.
This commit is contained in:
parent
77cf37e0fa
commit
2d77403a0b
17
server.py
17
server.py
@ -79,14 +79,15 @@ def start_hostwatch(seed_hosts):
|
|||||||
# child
|
# child
|
||||||
rv = 99
|
rv = 99
|
||||||
try:
|
try:
|
||||||
s2.close()
|
try:
|
||||||
os.dup2(s1.fileno(), 1)
|
s2.close()
|
||||||
os.dup2(s1.fileno(), 0)
|
os.dup2(s1.fileno(), 1)
|
||||||
s1.close()
|
os.dup2(s1.fileno(), 0)
|
||||||
rv = hostwatch.hw_main(seed_hosts) or 0
|
s1.close()
|
||||||
except Exception, e:
|
rv = hostwatch.hw_main(seed_hosts) or 0
|
||||||
log('%s\n' % _exc_dump())
|
except Exception, e:
|
||||||
rv = 98
|
log('%s\n' % _exc_dump())
|
||||||
|
rv = 98
|
||||||
finally:
|
finally:
|
||||||
os._exit(rv)
|
os._exit(rv)
|
||||||
s1.close()
|
s1.close()
|
||||||
|
Loading…
Reference in New Issue
Block a user