Skip to content

Commit

Permalink
safer NoneType check
Browse files Browse the repository at this point in the history
  • Loading branch information
ziw-liu committed Feb 22, 2024
1 parent e59e403 commit 406012b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion iohub/ndtiff.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def __init__(self, data_path: Path | str):
self._ndtiff_channel_names = list(self._axes.get("channel", [None]))
self._mm_meta = self._get_summary_metadata()
self.channel_names = self._ndtiff_channel_names
if not self.channel_names[0]:
if self.channel_names[0] is None:
self.channel_names = [f"Channel{i}" for i in range(self.channels)]
_logger.warning(
"No channel names found in metadata. Using defaults: "
Expand Down

0 comments on commit 406012b

Please sign in to comment.