From 6c24783df7a832ee3e3b84f8212bcc77e6e04c0d Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Tue, 1 Sep 2020 10:33:56 +0200 Subject: [PATCH] Log full exceptions in case of failures in a procedure --- platypush/plugins/mail/smtp.py | 2 +- platypush/procedure/__init__.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/platypush/plugins/mail/smtp.py b/platypush/plugins/mail/smtp.py index f9d0a395a..e0b14029f 100644 --- a/platypush/plugins/mail/smtp.py +++ b/platypush/plugins/mail/smtp.py @@ -14,7 +14,7 @@ class MailSmtpPlugin(MailOutPlugin): _default_port = 25 _default_ssl_port = 465 - def __init__(self, server: str, port: Optional[int] = None, local_hostname: Optional[str] = None, + def __init__(self, server: Optional[str] = None, port: Optional[int] = None, local_hostname: Optional[str] = None, source_address: Optional[List[str]] = None, username: Optional[str] = None, password: Optional[str] = None, password_cmd: Optional[str] = None, access_token: Optional[str] = None, oauth_mechanism: Optional[str] = 'XOAUTH2', oauth_vendor: Optional[str] = None, ssl: bool = False, diff --git a/platypush/procedure/__init__.py b/platypush/procedure/__init__.py index af8734253..468eb57de 100644 --- a/platypush/procedure/__init__.py +++ b/platypush/procedure/__init__.py @@ -478,6 +478,7 @@ def procedure(f): return Response(output=ret) except Exception as e: + logger.exception(e) return Response(errors=[str(e)]) return _execute_procedure