safeJID: Add debug logging on invalidJID exception

Signed-off-by: Maxime Buquet's avatarMaxime “pep” Buquet <pep@bouah.net>
parent dd55845a
......@@ -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('')
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment