From 54e2161e2948b9d30ad216c926f11f96246ed1c4 Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Wed, 30 Sep 2020 09:56:35 +0000 Subject: Tweaked the import logic so that the Imported() class returns the actual module imported when executing the import, rather than returning itself. Also fixed awesome so that it loads and looks for _prep_function() with a safe and correct namespace --- archinstall/lib/profiles.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'archinstall/lib/profiles.py') diff --git a/archinstall/lib/profiles.py b/archinstall/lib/profiles.py index 6d7a8b42..47e6dd36 100644 --- a/archinstall/lib/profiles.py +++ b/archinstall/lib/profiles.py @@ -47,7 +47,7 @@ class Imported(): def __enter__(self, *args, **kwargs): self.spec.loader.exec_module(self.imported) - return self + return self.imported def __exit__(self, *args, **kwargs): # TODO: https://stackoverflow.com/questions/28157929/how-to-safely-handle-an-exception-inside-a-context-manager -- cgit v1.2.3-54-g00ecf