From 28d44ecf74385e4adeaa03c9fa8b561b3ca4d9a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Sun, 20 Mar 2022 21:34:55 +0100 Subject: xep_0454: str.removeprefix is available since 3.9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- slixmpp/plugins/xep_0454/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: -- cgit v1.2.3