Plugin base classes: update method signatures & fix raise (#598)
This way IDEs can verify method overrides in subclasses, otherwise these are flagged as erroneous. Changed base classes to properly raise NotImplementedError; previously they would cause "TypeError: exceptions must derive from BaseException" Also fixed exception handling in sources.service.clean().
This commit is contained in:
@ -198,7 +198,7 @@ def clean(source):
|
||||
|
||||
try:
|
||||
certificates = s.clean(source.options)
|
||||
except NotImplemented:
|
||||
except NotImplementedError:
|
||||
current_app.logger.warning("Cannot clean source: {0}, source plugin does not implement 'clean()'".format(
|
||||
source.label
|
||||
))
|
||||
|
Reference in New Issue
Block a user