check if sysconfig.toml is really a file
This commit is contained in:
@@ -29,6 +29,10 @@ class SystemConfigurator:
|
|||||||
self.config_path = path
|
self.config_path = path
|
||||||
|
|
||||||
def _parse_config(self):
|
def _parse_config(self):
|
||||||
|
if not os.path.isfile(self.config_path):
|
||||||
|
raise RuntimeError(
|
||||||
|
f"{self.config_path}: is not a file. Mount a valid config."
|
||||||
|
)
|
||||||
with open(self.config_path, "rb") as f:
|
with open(self.config_path, "rb") as f:
|
||||||
self.config = tomllib.load(f)
|
self.config = tomllib.load(f)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user