From e67430795ebc83b0d9c992cb9ff12da77cf797ba Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Mon, 3 Oct 2022 11:24:58 -0400 Subject: [PATCH] [72] fix 'NoneType' object has no attribute 'lower' --- VERSION | 2 +- modules/meta.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/VERSION b/VERSION index c9fc1240..5985c3e4 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.17.3-develop71 +1.17.3-develop72 diff --git a/modules/meta.py b/modules/meta.py index f33dc483..7a1d6312 100644 --- a/modules/meta.py +++ b/modules/meta.py @@ -94,7 +94,7 @@ class DataFile: else: return data - def load_file(self, file_type, file_path, library_type=None, overlay=False, translation=False): + def load_file(self, file_type, file_path, overlay=False, translation=False): if translation: if file_path.endswith(".yml"): file_path = file_path[:-4] @@ -126,8 +126,8 @@ class DataFile: defaults_path = os.path.join(defaults_path, "overlays") if os.path.exists(os.path.abspath(os.path.join(defaults_path, file_path))): file_path = os.path.abspath(os.path.join(defaults_path, file_path)) - else: - for default_folder in [library_type.lower(), "both", "chart", "award"]: + elif self.library: + for default_folder in [self.library.type.lower(), "both", "chart", "award"]: if os.path.exists(os.path.abspath(os.path.join(defaults_path, default_folder, file_path))): file_path = os.path.abspath(os.path.join(defaults_path, default_folder, file_path)) break @@ -496,7 +496,7 @@ class MetadataFile(DataFile): else: logger.info("") logger.separator(f"Loading Metadata {file_type}: {path}") - data = self.load_file(self.type, self.path, library_type=library.type) + data = self.load_file(self.type, self.path) self.metadata = get_dict("metadata", data, library.metadatas) self.templates = get_dict("templates", data) self.external_templates(data)