]> arthur.barton.de Git - bup.git/commitdiff
Only silence ENOENT in helpers.unlink
authorNathan Bird <ecthellion@gmail.com>
Fri, 8 Aug 2014 16:59:20 +0000 (09:59 -0700)
committerRob Browning <rlb@defaultvalue.org>
Fri, 8 Aug 2014 19:37:00 +0000 (14:37 -0500)
This is what it is documented as doing and what makes sense in this
case.

Signed-off-by: Nathan Bird <ecthellion@gmail.com>
[rlb@defaultvalue.org: adjust commit message]
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
lib/bup/helpers.py

index 300e67eee25dd9123537b73a1b4fc1a3fc72075c..cf53da84a6a43a6569ec75b6ddd2e868d1d50207 100644 (file)
@@ -188,8 +188,8 @@ def unlink(f):
     try:
         os.unlink(f)
     except OSError, e:
-        if e.errno == errno.ENOENT:
-            pass  # it doesn't exist, that's what you asked for
+        if e.errno != errno.ENOENT:
+            raise
 
 
 def readpipe(argv, preexec_fn=None):