Skip to content

Commit

Permalink
Added empty split check to skip instead of crash
Browse files Browse the repository at this point in the history
Signed-off-by: Niklas Spielbauer <[email protected]>
  • Loading branch information
nspielbau committed Feb 4, 2025
1 parent f0ae641 commit 50340c1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion catmux/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ def __init__(self, **kwargs):

self.splits = list()
for split_data in split_command_list:
self.splits.append(Split(split_data))
if hasattr(split_data, "__iter__"):
self.splits.append(Split(split_data))

Check warning on line 58 in catmux/window.py

View check run for this annotation

Codecov / codecov/patch

catmux/window.py#L56-L58

Added lines #L56 - L58 were not covered by tests
else:
print("Split is empty, dropping")

Check warning on line 60 in catmux/window.py

View check run for this annotation

Codecov / codecov/patch

catmux/window.py#L60

Added line #L60 was not covered by tests

if kwargs is not None:
for (key, value) in kwargs.items():
Expand Down

0 comments on commit 50340c1

Please sign in to comment.