change load function to use Config stored variables
This commit is contained in:
+1
-1
@@ -28,7 +28,7 @@ class Map:
|
||||
def load_from_file(cls, file_options):
|
||||
LOGGING.debug(f"Loading from file: {file_options}")
|
||||
if os.path.exists(file_options["path"]):
|
||||
with open(file_options["path"], "rb") as f:
|
||||
with open(f'{file_options["path"]}/{file_options["name"]}', "rb") as f:
|
||||
data = my_pickle.load(f, file_options['compression'], None)
|
||||
|
||||
new_class = cls(file_options["path"])
|
||||
|
||||
@@ -52,7 +52,7 @@ class SavedState:
|
||||
def load_from_file(cls, file_options):
|
||||
LOGGING.debug(f"Loading from file: {file_options}")
|
||||
if os.path.exists(file_options["path"]):
|
||||
with open(file_options["path"], "rb") as f:
|
||||
with open(f'{file_options["path"]}/{file_options["name"]}', "rb") as f:
|
||||
data = my_pickle.load(f, file_options['compression'], None)
|
||||
|
||||
new_class = cls()
|
||||
|
||||
Reference in New Issue
Block a user