diff --git a/urartu/VERSION b/urartu/VERSION index e164972..d456ca5 100644 --- a/urartu/VERSION +++ b/urartu/VERSION @@ -1 +1 @@ -2.0.18 \ No newline at end of file +2.0.19 \ No newline at end of file diff --git a/urartu/utils/registry.py b/urartu/utils/registry.py index 5d41a49..afd82bd 100644 --- a/urartu/utils/registry.py +++ b/urartu/utils/registry.py @@ -18,7 +18,8 @@ def remove_entry(module_name): file_content.pop(module_name) with open(Registry.REGISTRY_FILE_PATH, "w") as file: - yaml.dump(file_content, file) + if file_content: + yaml.dump(file_content, file) return True @@ -37,7 +38,7 @@ def add_entry(module_name, module_root_dir): else: file_content[module_name] = str(module_root_dir) - with open(Registry.REGISTRY_FILE_PATH, "a") as file: + with open(Registry.REGISTRY_FILE_PATH, "w") as file: yaml.dump(file_content, file) return True @@ -53,9 +54,6 @@ def load_file_content(): if file_content is None: return {} - # raise RuntimeError( - # f"Registery is empty, register a module using `urartu register --name='NAME' --path='PATH'` command." - # ) return file_content