CLI mv: if we can't created the new child, don't delete the old one

This commit is contained in:
Brian Warner 2008-05-20 12:49:47 -07:00
parent a8ed3208ba
commit abe4addbdb

View File

@ -35,6 +35,8 @@ def mv(nodeurl, aliases, from_file, to_file, stdout, stderr):
if not re.search(r'^2\d\d$', str(status)):
print >>stderr, "error, got %s %s" % (resp.status, resp.reason)
print >>stderr, resp.read()
print >>stderr, "NOT removing the original"
return
# now remove the original
resp = do_http("DELETE", from_url)