Skip to content
Snippets Groups Projects
Commit d6bbc24e authored by Valerio Mariani's avatar Valerio Mariani
Browse files

Restored correct path check in cxi writer, it was overwritten by mistake

parent aca54999
No related branches found
No related tags found
No related merge requests found
...@@ -273,11 +273,12 @@ class CXIWriter: ...@@ -273,11 +273,12 @@ class CXIWriter:
if self._initialized is True: if self._initialized is True:
raise RuntimeError('Adding stacks to the writer is not possible after initialization.') raise RuntimeError('Adding stacks to the writer is not possible after initialization.')
if name in self._cxi_stacks: for entry in self._cxi_stacks:
if overwrite is True: if path == entry.path:
del (self._cxi_stacks[name]) if overwrite is True:
else: del (self._cxi_stacks[name])
raise RuntimeError('Cannot write the entry. Data is already present at the specified path.') else:
raise RuntimeError('Cannot write the entry. Data is already present at the specified path.')
new_stack = _Stack(path, initial_data, axes, compression, chunk_size) new_stack = _Stack(path, initial_data, axes, compression, chunk_size)
self._cxi_stacks[name] = new_stack self._cxi_stacks[name] = new_stack
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment