Only try to convert sorting_value to int if it's not None
This commit is contained in:
parent
b326b6bd33
commit
38dabfc1c0
1 changed files with 6 additions and 5 deletions
|
|
@ -1077,11 +1077,12 @@ class PluginManager(object):
|
|||
except:
|
||||
self.logger.exception("Error while trying to retrieve sorting order for plugin {}".format(impl[0]))
|
||||
|
||||
try:
|
||||
int(sorting_value)
|
||||
except ValueError:
|
||||
self.logger.warn("The order value returned by {} for sorting context {} is not a valid integer, ignoring it".format(impl[0], sorting_context))
|
||||
sorting_value = None
|
||||
if sorting_value is not None:
|
||||
try:
|
||||
int(sorting_value)
|
||||
except ValueError:
|
||||
self.logger.warn("The order value returned by {} for sorting context {} is not a valid integer, ignoring it".format(impl[0], sorting_context))
|
||||
sorting_value = None
|
||||
|
||||
return sorting_value is None, sorting_value, impl[0]
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue