Skip to content

Commit 030e68b

Browse files
committed
fix(helmbroker): clean_instance error
1 parent 5d42a2d commit 030e68b

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

rootfs/helmbroker/cleaner.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313

1414

1515
def clean_instance():
16+
if not os.path.exists(INSTANCES_PATH):
17+
return
1618
for instance_id in os.listdir(INSTANCES_PATH):
1719
if os.path.exists(get_instance_file(instance_id)):
1820
data = load_instance_meta(instance_id)

rootfs/helmbroker/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def load_instance_meta(instance_id):
8484

8585

8686
def dump_instance_meta(instance_id, data):
87-
data["last_modified_time "] = time.time()
87+
data["last_modified_time"] = time.time()
8888
file = get_instance_file(instance_id)
8989
validate(instance=data, schema=INSTANCE_META_SCHEMA)
9090
with open(file, "w") as f:
@@ -119,7 +119,7 @@ def load_binding_meta(instance_id):
119119

120120

121121
def dump_binding_meta(instance_id, data):
122-
data["last_modified_time "] = time.time()
122+
data["last_modified_time"] = time.time()
123123
file = os.path.join(get_instance_path(instance_id), "binding.json")
124124
validate(instance=data, schema=INSTANCE_META_SCHEMA)
125125
with open(file, "w") as f:

0 commit comments

Comments
 (0)