summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Bouve <crahan@n00.be>2019-02-14 02:11:11 +0100
committerBrian May <brian@linuxpenguins.xyz>2019-02-14 12:11:11 +1100
commit4e945ca4de8587e37dc793e7dccd12adc8cf9713 (patch)
treecf0887ea30ff398760c7b8fa085cc0f4f945f94c
parent3bfb975ed9b4024cbc762324539868e901cf8a04 (diff)
assembler import fix (#319)
* assembler import fix. * Added noqa to import statements.
-rw-r--r--sshuttle/assembler.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/sshuttle/assembler.py b/sshuttle/assembler.py
index e11e429..3ab5356 100644
--- a/sshuttle/assembler.py
+++ b/sshuttle/assembler.py
@@ -2,10 +2,6 @@ import sys
import zlib
import imp
-import sshuttle.helpers
-import sshuttle.cmdline_options as options
-from sshuttle.server import main
-
verbosity = verbosity # noqa: F821 must be a previously defined global
z = zlib.decompressobj()
while 1:
@@ -34,7 +30,12 @@ while 1:
sys.stderr.flush()
sys.stdout.flush()
+# import can only happen once the code has been transferred to
+# the server. 'noqa: E402' excludes these lines from QA checks.
+import sshuttle.helpers # noqa: E402
sshuttle.helpers.verbose = verbosity
+import sshuttle.cmdline_options as options # noqa: E402
+from sshuttle.server import main # noqa: E402
main(options.latency_control, options.auto_hosts, options.to_nameserver,
options.auto_nets)