Returning Profile() to correctly handle with statement
This commit is contained in:
parent
bef8926004
commit
7f57e670da
|
|
@ -130,7 +130,7 @@ class Script():
|
||||||
imported = importlib.util.module_from_spec(self.spec)
|
imported = importlib.util.module_from_spec(self.spec)
|
||||||
sys.modules[self.namespace] = imported
|
sys.modules[self.namespace] = imported
|
||||||
|
|
||||||
return imported
|
return self
|
||||||
|
|
||||||
def execute(self):
|
def execute(self):
|
||||||
if not self.namespace in sys.modules or self.spec is None:
|
if not self.namespace in sys.modules or self.spec is None:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue