get_processor_resource_types: handle non-existing "paramters"
@@ -163,7 +163,7 @@ def get_processor_resource_types(executable, ocrd_tool=None):
if not which(executable):
return ['*/*']
ocrd_tool = get_ocrd_tool_json(executable)
- if not next((True for p in ocrd_tool['parameters'].values() if 'content-type' in p), False):
+ if not next((True for p in ocrd_tool.get('parameters', {}).values() if 'content-type' in p), False):
# None of the parameters for this processor are resources (or not
# the resource parametrs are not properly declared, so output both
# directories and files
