mirror of
https://github.com/sshuttle/sshuttle.git
synced 2025-02-12 00:19:22 +01:00
Use types instead of imp.new_module.
I can follow up with https://docs.python.org/3/library/importlib.html#importlib.util.module_from_spec if need be.
This commit is contained in:
parent
ec2018d664
commit
ff45dd86fb
@ -1,6 +1,6 @@
|
||||
import sys
|
||||
import zlib
|
||||
import imp
|
||||
import types
|
||||
|
||||
verbosity = verbosity # noqa: F821 must be a previously defined global
|
||||
z = zlib.decompressobj()
|
||||
@ -15,7 +15,7 @@ while 1:
|
||||
% (name, nbytes))
|
||||
content = z.decompress(sys.stdin.read(nbytes))
|
||||
|
||||
module = imp.new_module(name)
|
||||
module = types.ModuleType(name)
|
||||
parents = name.rsplit(".", 1)
|
||||
if len(parents) == 2:
|
||||
parent, parent_name = parents
|
||||
|
Loading…
Reference in New Issue
Block a user