Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/__main__.py
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2024-05-10 15:56:28 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2024-05-10 15:56:28 +0200
commit683da22298abbd90f51d4dd38a7ec4b0dfb04555 (patch)
treeec2ac04967f9277df038edc362201937b331abe5 /archinstall/__main__.py
parentaf7ab9833c9f9944874f0162ae0975175ddc628d (diff)
parent3381cd55673e5105697d354cf4a1be9a7bcef062 (diff)
merged with upstreamHEADmaster
Diffstat (limited to 'archinstall/__main__.py')
-rw-r--r--archinstall/__main__.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/archinstall/__main__.py b/archinstall/__main__.py
index e125930f..69a79855 100644
--- a/archinstall/__main__.py
+++ b/archinstall/__main__.py
@@ -5,9 +5,13 @@ import pathlib
# Load .git version before the builtin version
if pathlib.Path('./archinstall/__init__.py').absolute().exists():
spec = importlib.util.spec_from_file_location("archinstall", "./archinstall/__init__.py")
+
+ if spec is None or spec.loader is None:
+ raise ValueError('Could not retrieve spec from file: archinstall/__init__.py')
+
archinstall = importlib.util.module_from_spec(spec)
sys.modules["archinstall"] = archinstall
- spec.loader.exec_module(sys.modules["archinstall"])
+ spec.loader.exec_module(archinstall)
else:
import archinstall