From 11850bfe1d411d76c409667583f84038c353db54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Sun, 7 Apr 2019 20:40:48 +0100 Subject: safeJID: Add debug logging on invalidJID exception MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- poezio/common.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'poezio/common.py') diff --git a/poezio/common.py b/poezio/common.py index a39f8145..ba179310 100644 --- a/poezio/common.py +++ b/poezio/common.py @@ -16,10 +16,13 @@ import os import subprocess import time import string +import logging from slixmpp import JID, InvalidJID, Message from poezio.poezio_shlex import shlex +log = logging.getLogger(__name__) + def _get_output_of_command(command: str) -> Optional[List[str]]: """ @@ -459,4 +462,9 @@ def safeJID(*args, **kwargs) -> JID: try: return JID(*args, **kwargs) except InvalidJID: + log.debug( + 'safeJID caught an invalidJID exception: %r, %r', + args, kwargs, + exc_info=True, + ) return JID('') -- cgit v1.2.3