Skip to content

Commit a8c857a

Browse files
committed
fix issue with startup
1 parent 363e836 commit a8c857a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

scripts/spartan/World.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,9 @@ def config(self) -> dict:
516516

517517
logger.info(f"translated legacy config")
518518
return config
519+
else:
520+
open(self.config_path, 'w')
521+
logger.info(f"Generated new config file at '{self.config_path}'")
519522

520523
with open(self.config_path, 'r') as config:
521524
try:
@@ -529,6 +532,10 @@ def load_config(self):
529532
This function should be called after worker command arguments are parsed.
530533
"""
531534
config_raw = self.config()
535+
if config_raw is None:
536+
logger.debug("cannot parse null config (present but empty config file?)")
537+
return
538+
532539
config = Config_Model(**config_raw)
533540

534541
# saves config schema to <extension>/distributed-config.schema.json

0 commit comments

Comments
 (0)