Commit 4acef0cb authored by Anders Blomdell's avatar Anders Blomdell
Browse files

Use types instead of imp

parent 9d37edfb
......@@ -154,7 +154,7 @@ class Importer:
return None
def load_module(self, fullname):
mod = sys.modules.setdefault(fullname, imp.new_module(fullname))
mod = sys.modules.setdefault(fullname, types.ModuleType(fullname))
(filename, src) = self.code[fullname]
mod.__file__ = filename
mod.__loader__ = self
......@@ -213,7 +213,7 @@ if __name__ == '__main__':
import sys
importer = Importer(code)
import imp
import types
# This will start actual execution
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment