ome / omero-scripts

Core OMERO Scripts
https://pypi.org/project/omero-scripts/
12 stars 32 forks source link

populate metadata - remove try/except #190

Closed will-moore closed 2 years ago

will-moore commented 2 years ago

Fixes #189.

This removes the annoying extra exception from script logs by explicitly checking whether we are using old or recent metadata plugin, instead of just try/except.

To test:

  File "./script", line 124, in populate_metadata
    ctx.parse_from_handle(data)
AttributeError: 'ParsingContext' object has no attribute 'parse_from_handle'
dominikl commented 2 years ago

👍 Looks good. Didn't get the error log.