update tools/syscap_collector.py.

Signed-off-by: flying <pengmengjie1@huawei.com>
This commit is contained in:
flying
2024-02-17 04:12:57 +00:00
committed by Gitee
parent 8ab604fddb
commit 37b5816af5
+1 -1
View File
@@ -45,7 +45,7 @@ def dict_to_json(output_path: str, syscaps_dict: dict):
for product_name, syscaps_list in syscaps_dict.items():
filename = os.path.join(output_path, f'{product_name}.json')
with os.fdopen(os.open(filename, flags, modes), 'w') as f:
json.dump({'SysCaps': syscaps_list}, indent=4, f)
json.dump({'SysCaps': syscaps_list}, f, indent=4)
print("end...")