Skip to content

Commit

Permalink
Fixing format_url for windaube
Browse files Browse the repository at this point in the history
  • Loading branch information
Yomguithereal committed May 5, 2023
1 parent 4feb5ee commit ec5ebee
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions ural/format_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
except ImportError:
Iterable = (tuple, list, set, frozenset)

from os.path import join

from ural.utils import string_type, quote


Expand All @@ -34,9 +32,9 @@ def format_url(

# Path
if isinstance(path, string_type):
url = join(base_url, path.lstrip("/"))
url = base_url.rstrip("/") + "/" + path.lstrip("/")
elif isinstance(path, Iterable):
url = join(base_url, "/".join(path).lstrip("/"))
url = base_url.rstrip("/") + "/" + "/".join(path).lstrip("/")
elif path is not None:
raise TypeError("path should be a string or an iterable of path items")

Expand Down

0 comments on commit ec5ebee

Please sign in to comment.