diff options
author | Maxime “pep” Buquet <pep@bouah.net> | 2022-03-20 21:34:55 +0100 |
---|---|---|
committer | Maxime “pep” Buquet <pep@bouah.net> | 2022-03-20 21:34:55 +0100 |
commit | 28d44ecf74385e4adeaa03c9fa8b561b3ca4d9a0 (patch) | |
tree | d99a42a1e6f87510d9226b8e9a51556d416c859a | |
parent | 06e4e480c14a614cbf00646271fbc9abc6908fbb (diff) | |
download | slixmpp-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__.py | 2 |
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: |