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.)
This commit is contained in:
Frederik Deweerdt 2010-09-21 17:15:46 -07:00 committed by Avery Pennarun
parent dcba684766
commit b35cfbd022

View File

@ -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 *