Commits

Anonymous committed 29c950b

fix path

Comments (0)

Files changed (1)

restclient/rest.py

     retval = [base]
 
     # build the path
-    path = '/'.join([''] +
-                    [unicode_quote(s.strip('/')) for s in path
-                     if s is not None])
-    if path:
-        retval.append(path)
+    path_ = ''
+    for p in path:
+        if p is not None:
+            path_ += "/".join([unicode_quote(s) for s in p.split('/')
+                if s is not None])
 
+    if path_:
+        retval.append(path_)
+    
     params = []
     for k, v in query.items():
         if type(v) in (list, tuple):