summaryrefslogtreecommitdiff
path: root/poezio/common.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2021-04-12 20:43:42 +0200
committermathieui <mathieui@mathieui.net>2021-04-12 20:43:51 +0200
commitfc1eca7ac39bfc0dc82b2809b19b3d1c7b64a2c7 (patch)
tree43c1e991617df5d981f2c9a704ae0732818c0a16 /poezio/common.py
parente6510792b4d4dcb0d9e7746fff0dd891cba33e3a (diff)
downloadpoezio-fc1eca7ac39bfc0dc82b2809b19b3d1c7b64a2c7.tar.gz
poezio-fc1eca7ac39bfc0dc82b2809b19b3d1c7b64a2c7.tar.bz2
poezio-fc1eca7ac39bfc0dc82b2809b19b3d1c7b64a2c7.tar.xz
poezio-fc1eca7ac39bfc0dc82b2809b19b3d1c7b64a2c7.zip
fix: remove all remaining safejids (fix #3457)
Diffstat (limited to 'poezio/common.py')
-rw-r--r--poezio/common.py18
1 files changed, 0 insertions, 18 deletions
diff --git a/poezio/common.py b/poezio/common.py
index f80555ac..d4d09f9f 100644
--- a/poezio/common.py
+++ b/poezio/common.py
@@ -459,24 +459,6 @@ def format_gaming_string(infos: Dict[str, str]) -> str:
return name
-def safeJID(*args: Any, **kwargs: Any) -> JID:
- """
- Construct a :py:class:`slixmpp.JID` object from a string.
-
- Used to avoid tracebacks during is stringprep fails
- (fall back to a JID with an empty string).
- """
- try:
- return JID(*args, **kwargs)
- except InvalidJID:
- log.debug(
- 'safeJID caught an invalidJID exception: %r, %r',
- args, kwargs,
- exc_info=True,
- )
- return JID('')
-
-
def unique_prefix_of(a: str, b: str) -> str:
"""
Return the unique prefix of `a` with `b`.