]> arthur.barton.de Git - bup.git/commitdiff
cmd/ftp: if 'get' command returns an error, print it first.
authorAvery Pennarun <apenwarr@gmail.com>
Fri, 23 Apr 2010 20:32:31 +0000 (16:32 -0400)
committerAvery Pennarun <apenwarr@gmail.com>
Fri, 23 Apr 2010 20:32:31 +0000 (16:32 -0400)
Previously we would print "Saving 'filename'" even if we were about to
report that 'filename' doesn't exist or is the wrong file type.

cmd/ftp-cmd.py

index 9daa4793ee01b748883e1add812db970f94fea28..f7b0492a31ace5686991ad1851dd1b2efd071a00 100755 (executable)
@@ -116,8 +116,8 @@ for line in lines:
             rname = words[1]
             (dir,base) = os.path.split(rname)
             lname = len(words)>2 and words[2] or base
-            log('Saving %r\n' % lname)
             inf = pwd.resolve(rname).open()
+            log('Saving %r\n' % lname)
             write_to_file(inf, open(lname, 'wb'))
         elif cmd == 'mget':
             for parm in words[1:]: