projects
/
kamaki
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3f931d4
)
Remove trailing / for url paths
author
Stavros Sachtouris
<saxtouri@admin.grnet.gr>
Tue, 26 Feb 2013 14:50:31 +0000
(16:50 +0200)
committer
Stavros Sachtouris
<saxtouri@admin.grnet.gr>
Tue, 26 Feb 2013 14:50:31 +0000
(16:50 +0200)
kamaki/clients/utils.py
patch
|
blob
|
history
diff --git
a/kamaki/clients/utils.py
b/kamaki/clients/utils.py
index
63262e9
..
d9c2bfe
100644
(file)
--- a/
kamaki/clients/utils.py
+++ b/
kamaki/clients/utils.py
@@
-91,7
+91,7
@@
def path4url(*args):
isinstance(arg, str)) else '%s' % arg for arg in args])
while '//' in r:
r = r.replace('//', '/')
- return r
+ return ('/%s' % r.strip('/')) if r else ''
def params4url(params):