simplify url strip

Co-authored-by: Roy Nieterau <roy_nieterau@hotmail.com>
This commit is contained in:
Jakub Trllo 2024-03-27 14:00:00 +01:00 committed by GitHub
parent 87205c5f8e
commit 1ba2b97e9f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -146,7 +146,8 @@ def prep_url(url_in):
if url.startswith("file://localhost/"):
return url.replace("file://localhost/", "")
url = "{url}".format(url=url.startswith(os.sep) and url[1:] or url)
if url.startswith(os.sep):
url = url[1:]
return url