diff --git a/CHANGES.rst b/CHANGES.rst index 2065dfd..f4e178d 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,17 @@ Changelog ========= +dev (not yet released) +~~~~~~~~~~~~~~~~~~~~~~ + +Bug fixes and minor changes +--------------------------- + ++ `#171`_: Fix `dumpinvestigation.py` example script + +.. _#171: https://github.com/icatproject/python-icat/pull/171 + + .. _changes-1_7_0: 1.7.0 (2025-12-04) diff --git a/doc/examples/dumpinvestigation.py b/doc/examples/dumpinvestigation.py index 6dcbe57..209530f 100644 --- a/doc/examples/dumpinvestigation.py +++ b/doc/examples/dumpinvestigation.py @@ -29,7 +29,7 @@ def get_investigation_id(client, invid): if len(l) == 2: # one colon, invid == name:visitId query.addConditions({"visitId": "= '%s'" % l[1]}) - else: + elif len(l) > 2: # too many colons raise RuntimeError("Invalid investigation identifier '%s'" % invid) return client.assertedSearch(query)[0]