projects
/
kamaki
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
142730a
)
Fix double // in urls
author
Stavros Sachtouris
<saxtouri@admin.grnet.gr>
Tue, 26 Feb 2013 14:47:10 +0000
(16:47 +0200)
committer
Stavros Sachtouris
<saxtouri@admin.grnet.gr>
Tue, 26 Feb 2013 14:47:10 +0000
(16:47 +0200)
kamaki/clients/utils.py
patch
|
blob
|
history
diff --git
a/kamaki/clients/utils.py
b/kamaki/clients/utils.py
index
c09bb61
..
63262e9
100644
(file)
--- a/
kamaki/clients/utils.py
+++ b/
kamaki/clients/utils.py
@@
-86,8
+86,12
@@
def path4url(*args):
:returns: (str) a path in the form /args[0]/args[1]/...
"""
- return '/'.join([''] + [arg.decode('utf-8') if (
+
+ r = '/'.join([''] + [arg.decode('utf-8') if (
isinstance(arg, str)) else '%s' % arg for arg in args])
+ while '//' in r:
+ r = r.replace('//', '/')
+ return r
def params4url(params):