summaryrefslogtreecommitdiff
path: root/poezio/common.py
diff options
context:
space:
mode:
authorMaxime “pep” Buquet <pep@bouah.net>2019-04-07 20:40:48 +0100
committerMaxime “pep” Buquet <pep@bouah.net>2019-04-07 20:40:48 +0100
commit11850bfe1d411d76c409667583f84038c353db54 (patch)
tree5babe21413597d4a97590ce61523adf5280d7240 /poezio/common.py
parentdd55845af76f57db2cb1bab87ad5ed86b65c9154 (diff)
downloadpoezio-11850bfe1d411d76c409667583f84038c353db54.tar.gz
poezio-11850bfe1d411d76c409667583f84038c353db54.tar.bz2
poezio-11850bfe1d411d76c409667583f84038c353db54.tar.xz
poezio-11850bfe1d411d76c409667583f84038c353db54.zip
safeJID: Add debug logging on invalidJID exception
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
Diffstat (limited to 'poezio/common.py')
-rw-r--r--poezio/common.py8
1 files changed, 8 insertions, 0 deletions
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('')