Commit d1323365 authored by Pierre Paleo's avatar Pierre Paleo
Browse files

dicttoh5: use update_mode instead of overwrite_data

parent db57a92a
......@@ -228,6 +228,10 @@ def export_dict_to_h5(dic, h5file, h5path, overwrite_data=True, mode="a"):
mode: str, optional
File mode. Default is "a" (append).
"""
# in silx >= 0.15, overwrite_data = True becomes update_mode='modify
# and overwrite_data=False becomes update_mode='add'
update_mode = ["add", "modify"][overwrite_data]
#
modified_dic = convert_dict_values(
dic,
{None: "None"},
......@@ -236,7 +240,7 @@ def export_dict_to_h5(dic, h5file, h5path, overwrite_data=True, mode="a"):
modified_dic,
h5file=h5file,
h5path=h5path,
overwrite_data=overwrite_data,
update_mode=update_mode,
mode=mode
)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment