xep_0454: str.removeprefix is available since 3.9
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
06e4e480c1
commit
28d44ecf74
1 changed files with 1 additions and 1 deletions
|
@ -121,7 +121,7 @@ class XEP_0454(BasePlugin):
|
||||||
"""Helper to format a HTTPS URL to an AESGCM URI"""
|
"""Helper to format a HTTPS URL to an AESGCM URI"""
|
||||||
if not url.startswith('https://') or url.find('#') != -1:
|
if not url.startswith('https://') or url.find('#') != -1:
|
||||||
raise InvalidURL
|
raise InvalidURL
|
||||||
return 'aesgcm://' + url.removeprefix('https://') + '#' + fragment
|
return 'aesgcm://' + url[len('https://'):] + '#' + fragment
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def map_extensions(ext: str) -> str:
|
def map_extensions(ext: str) -> str:
|
||||||
|
|
Loading…
Reference in a new issue