diff --git a/rootfs/helmbroker/cleaner.py b/rootfs/helmbroker/cleaner.py index 4dffa5a..0b01814 100644 --- a/rootfs/helmbroker/cleaner.py +++ b/rootfs/helmbroker/cleaner.py @@ -13,6 +13,8 @@ def clean_instance(): + if not os.path.exists(INSTANCES_PATH): + return for instance_id in os.listdir(INSTANCES_PATH): if os.path.exists(get_instance_file(instance_id)): data = load_instance_meta(instance_id) diff --git a/rootfs/helmbroker/utils.py b/rootfs/helmbroker/utils.py index 69e59e6..dbbf351 100644 --- a/rootfs/helmbroker/utils.py +++ b/rootfs/helmbroker/utils.py @@ -84,7 +84,7 @@ def load_instance_meta(instance_id): def dump_instance_meta(instance_id, data): - data["last_modified_time "] = time.time() + data["last_modified_time"] = time.time() file = get_instance_file(instance_id) validate(instance=data, schema=INSTANCE_META_SCHEMA) with open(file, "w") as f: @@ -119,7 +119,7 @@ def load_binding_meta(instance_id): def dump_binding_meta(instance_id, data): - data["last_modified_time "] = time.time() + data["last_modified_time"] = time.time() file = os.path.join(get_instance_path(instance_id), "binding.json") validate(instance=data, schema=INSTANCE_META_SCHEMA) with open(file, "w") as f: