diff --git a/urartu/VERSION b/urartu/VERSION index da37822..3bad788 100644 --- a/urartu/VERSION +++ b/urartu/VERSION @@ -1 +1 @@ -2.0.11 \ No newline at end of file +2.0.12 \ No newline at end of file diff --git a/urartu/utils/registry.py b/urartu/utils/registry.py index 7642f25..2ed8ce5 100644 --- a/urartu/utils/registry.py +++ b/urartu/utils/registry.py @@ -32,18 +32,16 @@ def add_entry(module_name, module_root_dir): def load_file_content(): if not Registry.REGISTRY_FILE_PATH.exists(): Registry.REGISTRY_FILE_PATH.touch() - return {} - - with open(Registry.REGISTRY_FILE_PATH, "r") as file: - file_content = yaml.safe_load(file) - + file_content = None + else: + with open(Registry.REGISTRY_FILE_PATH, "r") as file: + file_content = yaml.safe_load(file) + if file_content is None: - raise RuntimeError( - f"Registery is empty, register a module using `urartu register --name='NAME' --path='PATH'` command." - ) - - with open(Registry.REGISTRY_FILE_PATH, "r") as file: - file_content = yaml.safe_load(file) + return {} + # raise RuntimeError( + # f"Registery is empty, register a module using `urartu register --name='NAME' --path='PATH'` command." + # ) return file_content