Skip to content

Commit

Permalink
fix #45 for py3k
Browse files Browse the repository at this point in the history
  • Loading branch information
ikirudennis committed Jul 4, 2017
1 parent 00ec365 commit 82b1545
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions textile/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -942,10 +942,16 @@ def encode_url(self, url):
quote(netloc_parsed['password']))
host = netloc_parsed['host']
port = netloc_parsed['port'] and netloc_parsed['port']
path = '/'.join( # could be encoded slashes!
quote(unquote(pce.encode('utf8')), b'')
for pce in parsed.path.split('/')
)
if six.PY2:
path = '/'.join( # could be encoded slashes!
quote(unquote(pce.encode('utf8')), b'')
for pce in parsed.path.split('/')
)
else:
path = '/'.join( # could be encoded slashes!
quote(unquote(pce), b'')
for pce in parsed.path.split('/')
)
fragment = quote(unquote(parsed.fragment))

# put it back together
Expand Down

0 comments on commit 82b1545

Please sign in to comment.