[snapshotprocessor] fix void arrays

This commit is contained in:
Noe Brucy
2021-07-07 11:14:15 +02:00
parent eae00f8788
commit c04f576080
+3 -2
View File
@@ -504,8 +504,9 @@ class SnapshotProcessor(HDF5Container):
hdf5 = tables.open_file(filename, mode="w") hdf5 = tables.open_file(filename, mode="w")
try: try:
for key in data: for key in data:
hdf5.create_array( if len(data[key] > 0):
"/data", key, data[key], "", createparents=True hdf5.create_array(
"/data", key, data[key], "", createparents=True
) )
finally: finally:
hdf5.close() hdf5.close()