mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-06-04 00:30:53 +00:00
CLI mv: if we can't created the new child, don't delete the old one
This commit is contained in:
parent
a8ed3208ba
commit
abe4addbdb
@ -35,6 +35,8 @@ def mv(nodeurl, aliases, from_file, to_file, stdout, stderr):
|
|||||||
if not re.search(r'^2\d\d$', str(status)):
|
if not re.search(r'^2\d\d$', str(status)):
|
||||||
print >>stderr, "error, got %s %s" % (resp.status, resp.reason)
|
print >>stderr, "error, got %s %s" % (resp.status, resp.reason)
|
||||||
print >>stderr, resp.read()
|
print >>stderr, resp.read()
|
||||||
|
print >>stderr, "NOT removing the original"
|
||||||
|
return
|
||||||
|
|
||||||
# now remove the original
|
# now remove the original
|
||||||
resp = do_http("DELETE", from_url)
|
resp = do_http("DELETE", from_url)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user