Returning Profile() to correctly handle with statement

This commit is contained in:
Anton Hvornum 2020-12-06 11:38:23 +01:00
parent bef8926004
commit 7f57e670da
1 changed files with 1 additions and 1 deletions

View File

@ -130,7 +130,7 @@ class Script():
imported = importlib.util.module_from_spec(self.spec)
sys.modules[self.namespace] = imported
return imported
return self
def execute(self):
if not self.namespace in sys.modules or self.spec is None: