A harvester may not have an info method

This fixes the error `AttributeError: 'HarvesterBase' object has
no attribute 'info'` which prevents new harvest sources from
being created.
This commit is contained in:
Bruce Bolt 2018-10-25 10:32:50 +01:00
parent dcbc5d5d05
commit e7384106c3
1 changed files with 4 additions and 1 deletions

View File

@ -113,7 +113,10 @@ def harvest_source_type_exists(value, context):
# Get all the registered harvester types
available_types = []
for harvester in PluginImplementations(IHarvester):
try:
info = harvester.info()
except AttributeError:
continue
if not info or 'name' not in info:
log.error('Harvester %s does not provide the harvester name in '
'the info response' % harvester)