Skip to content

Commit 08cee62

Browse files
committed
<fix>[ha]:simplejson not support item assignment
Resolves: ZSTAC-64244 Change-Id: I6a786175656f72726c6d61767a69767a76787776
1 parent 3b08300 commit 08cee62

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kvmagent/kvmagent/plugins/ha_plugin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -999,10 +999,10 @@ def update_shareblock_vm_ha_params(vg_uuids):
999999
return
10001000
with open(SHAREBLOCK_VM_HA_PARAMS_PATH, 'r+') as f:
10011001
cmd = f.read().strip()
1002-
if len(cmd) == 0:
1002+
if len(cmd) == 0 or cmd == '{}':
10031003
return
10041004

1005-
cmd_json = jsonobject.loads(cmd)
1005+
cmd_json = json.loads(cmd)
10061006
cmd_json["vgUuids"] = vg_uuids
10071007
f.seek(0)
10081008
f.truncate(0)

0 commit comments

Comments
 (0)