def get(nodeurl, root_uri, vdrive_fname, local_file):
if nodeurl[-1] != "/":
nodeurl += "/"
- url = nodeurl + "uri/%s/" % root_uri.replace("/","!")
+ url = nodeurl + "uri/%s/" % urllib.quote(root_uri.replace("/","!"))
if vdrive_fname:
url += vdrive_fname
def list(nodeurl, root_uri, vdrive_pathname):
if nodeurl[-1] != "/":
nodeurl += "/"
- url = nodeurl + "uri/%s/" % root_uri.replace("/","!")
+ url = nodeurl + "uri/%s/" % urllib.quote(root_uri.replace("/","!"))
if vdrive_pathname:
url += vdrive_pathname
url += "?t=json"
#!/usr/bin/env python
-import re, socket
+import re, socket, urllib
NODEURL_RE=re.compile("http://([^:]*)(:([1-9][0-9]*))?")
host = mo.group(1)
port = int(mo.group(3))
- url = "/uri/%s/" % root_uri.replace("/","!")
+ url = "/uri/%s/" % urllib.quote(root_uri.replace("/","!"))
if vdrive_fname:
url += vdrive_fname
#!/usr/bin/env python
-import re, socket
+import re, socket, urllib
NODEURL_RE=re.compile("http://([^:]*)(:([1-9][0-9]*))?")
host = mo.group(1)
port = int(mo.group(3))
- url = "/uri/%s/" % root_uri.replace("/","!")
+ url = "/uri/%s/" % urllib.quote(root_uri.replace("/","!"))
if vdrive_pathname:
url += vdrive_pathname