summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime “pep” Buquet <pep@bouah.net>2022-03-20 21:34:55 +0100
committerMaxime “pep” Buquet <pep@bouah.net>2022-03-20 21:34:55 +0100
commit28d44ecf74385e4adeaa03c9fa8b561b3ca4d9a0 (patch)
treed99a42a1e6f87510d9226b8e9a51556d416c859a
parent06e4e480c14a614cbf00646271fbc9abc6908fbb (diff)
downloadslixmpp-28d44ecf74385e4adeaa03c9fa8b561b3ca4d9a0.tar.gz
slixmpp-28d44ecf74385e4adeaa03c9fa8b561b3ca4d9a0.tar.bz2
slixmpp-28d44ecf74385e4adeaa03c9fa8b561b3ca4d9a0.tar.xz
slixmpp-28d44ecf74385e4adeaa03c9fa8b561b3ca4d9a0.zip
xep_0454: str.removeprefix is available since 3.9
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
-rw-r--r--slixmpp/plugins/xep_0454/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/slixmpp/plugins/xep_0454/__init__.py b/slixmpp/plugins/xep_0454/__init__.py
index d9292a13..d537432d 100644
--- a/slixmpp/plugins/xep_0454/__init__.py
+++ b/slixmpp/plugins/xep_0454/__init__.py
@@ -121,7 +121,7 @@ class XEP_0454(BasePlugin):
"""Helper to format a HTTPS URL to an AESGCM URI"""
if not url.startswith('https://') or url.find('#') != -1:
raise InvalidURL
- return 'aesgcm://' + url.removeprefix('https://') + '#' + fragment
+ return 'aesgcm://' + url[len('https://'):] + '#' + fragment
@staticmethod
def map_extensions(ext: str) -> str: