Changeset cb777ad in trunk


Ignore:
Timestamp:
2010-11-10T00:53:36Z (15 years ago)
Author:
david-sarah <david-sarah@…>
Branches:
master
Children:
59dcd50
Parents:
01a5365
Message:

tahoe_mv.py: use do_http, not urllib.openurl, in order to avoid connecting to the webapi server via a proxy. refs #1253

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified src/allmydata/scripts/tahoe_mv.py

    r01a5365 rcb777ad  
    2929        from_url += "/" + escape_path(from_path)
    3030    # figure out the source cap
    31     data = urllib.urlopen(from_url + "?t=json").read()
     31    resp = do_http("GET", from_url + "?t=json")
     32    if not re.search(r'^2\d\d$', str(resp.status)):
     33        print >>stderr, format_http_error("Error", resp)
     34        return 1
     35    data = resp.read()
    3236    nodetype, attrs = simplejson.loads(data)
    3337    cap = to_str(attrs.get("rw_uri") or attrs["ro_uri"])
Note: See TracChangeset for help on using the changeset viewer.