Skip to content

Commit bec6f5a

Browse files
Handle empty input string gracefully
1 parent 6a1a0d4 commit bec6f5a

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/imcflibs/imagej/omerotools.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,12 @@ def parse_url(client, omero_str):
5757
>>> for wrapper in img_wrappers:
5858
>>> imp = wpr.toImagePlus(client)
5959
"""
60+
if omero_str is None or str(omero_str).strip() == "":
61+
raise ValueError("No OMERO link or image ID provided.")
62+
6063
# Sanitize the string
61-
if omero_str is None:
62-
return []
6364
omero_str = omero_str.strip()
64-
65+
6566
image_ids = []
6667
dataset_ids = []
6768
image_wpr_list = []

0 commit comments

Comments
 (0)