`s/logger/_logger/` in the `plugins` module.

The `logger` name may clash with the context of an action, where
`logger` may have been set to something else.
This commit is contained in:
Fabio Manganiello 2023-08-19 13:32:19 +02:00
parent 1cb686bdab
commit 69706eaabe
Signed by: blacklight
GPG Key ID: D90FBA7F76362774
1 changed files with 2 additions and 2 deletions

View File

@ -15,7 +15,7 @@ from platypush.message.response import Response
from platypush.utils import get_decorators, get_plugin_name_by_class
PLUGIN_STOP_TIMEOUT = 5 # Plugin stop timeout in seconds
logger = logging.getLogger(__name__)
_logger = logging.getLogger(__name__)
def action(f: Callable[..., Any]) -> Callable[..., Response]:
@ -33,7 +33,7 @@ def action(f: Callable[..., Any]) -> Callable[..., Response]:
try:
result = f(*args, **kwargs)
except TypeError as e:
logger.exception(e)
_logger.exception(e)
result = Response(errors=[str(e)])
if result and isinstance(result, Response):