diff options
author | Frederik Deweerdt <frederik.deweerdt@xprog.eu> | 2010-09-21 17:15:46 -0700 |
---|---|---|
committer | Avery Pennarun <apenwarr@gmail.com> | 2010-09-21 17:15:46 -0700 |
commit | b35cfbd022e3b2f19512d875f592189ad8fd0e96 (patch) | |
tree | bda9560354021a5f241d106e2241941832d6ca92 | |
parent | dcba6847668fffa75f55b254fd6df8ef411a358e (diff) |
hostwatch: add missing errno import
If the ~/.sshuttle.hosts file does not exist, it triggers the following
error:
Traceback (most recent call last):
File "./sshuttle", line 80, in <module>
sys.exit(hostwatch.hw_main(extra))
File "/home/def/p/sshuttle/hostwatch.py", line 246, in hw_main
read_host_cache()
File "/home/def/p/sshuttle/hostwatch.py", line 41, in read_host_cache
if e.errno == errno.ENOENT:
NameError: global name 'errno' is not defined
(This only happened if you run 'sshuttle --hostwatch' from the command line
directly, without passing it through assembler.py.)
-rw-r--r-- | hostwatch.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hostwatch.py b/hostwatch.py index 1584171..7a71e9d 100644 --- a/hostwatch.py +++ b/hostwatch.py @@ -1,4 +1,4 @@ -import subprocess, time, socket, re, select +import subprocess, time, socket, re, select, errno if not globals().get('skip_imports'): import helpers from helpers import * |