forked from platypush/platypush
Improved compatibility for traceback.format_exception
.
The new syntax, that only requires an `Exception` instance to be passed to the function, is only compatible with Python >= 3.10.
This commit is contained in:
parent
12cca4991a
commit
3d7755159f
1 changed files with 8 additions and 1 deletions
|
@ -153,7 +153,14 @@ class EntitiesPlugin(Plugin):
|
|||
self.logger.warning(
|
||||
'Could not load results from plugin %s: %s', plugin_name, result
|
||||
)
|
||||
self.logger.warning(''.join(format_exception(result)))
|
||||
|
||||
self.logger.warning(
|
||||
''.join(
|
||||
format_exception(
|
||||
type(result), value=result, tb=result.__traceback__
|
||||
)
|
||||
)
|
||||
)
|
||||
else:
|
||||
results.append(result)
|
||||
except Empty:
|
||||
|
|
Loading…
Reference in a new issue