Skip to content

Commit e5c74d2

Browse files
authored
Merge pull request #510 from matham/patch-1
thanks for this quick fix!
2 parents 450391f + 81dfdbe commit e5c74d2

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

nixio/cmd/upgrade.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@ def update_alias_range_dimension(fname):
143143
dims = list()
144144
with h5py.File(fname, mode="r") as hfile:
145145
for block in hfile["data"].values():
146+
if "data_arrays" not in block:
147+
continue
148+
146149
for data_array in block["data_arrays"].values():
147150
if "dimensions" not in data_array:
148151
continue
@@ -215,11 +218,13 @@ def update_ver():
215218

216219

217220
def collect_tasks(fname):
221+
print(f"{fname}:")
222+
218223
file_ver = get_file_version(fname)
219224
file_verstr = ".".join(str(v) for v in file_ver)
220225
lib_verstr = ".".join(str(v) for v in nix.file.HDF_FF_VERSION)
221226
if file_ver >= nix.file.HDF_FF_VERSION:
222-
print(f"{fname}: Up to date ({file_verstr})")
227+
print(f" Up to date ({file_verstr})")
223228
return
224229

225230
# even if the version string indicates the file is old, check format
@@ -241,7 +246,7 @@ def collect_tasks(fname):
241246
tasks.append(update_format_version(fname))
242247

243248
# print task list
244-
print(f"{fname}: {file_verstr} -> {lib_verstr}")
249+
print(f" {file_verstr} -> {lib_verstr}")
245250
print(" - " + "\n - ".join(t.__doc__ for t in tasks) + "\n")
246251

247252
return tasks

0 commit comments

Comments
 (0)