]> arthur.barton.de Git - bup.git/commitdiff
fmincore: treat mmap EINVAL as ENODEV (i.e. skip)
authorRob Browning <rlb@defaultvalue.org>
Sun, 20 Dec 2015 00:08:01 +0000 (18:08 -0600)
committerRob Browning <rlb@defaultvalue.org>
Sun, 20 Dec 2015 00:08:05 +0000 (18:08 -0600)
As seen on OS X.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
lib/bup/helpers.py

index ff6fe62132749ec3b49fd1353d34f2249009d4e2..3c4cdb20b16099b602f09e7a4272fd7940aadcd9 100644 (file)
@@ -754,7 +754,7 @@ if _mincore:
             try:
                 m = mmap.mmap(fd, msize, mmap.MAP_PRIVATE, 0, 0, pos)
             except mmap.error, ex:
-                if ex.errno == errno.ENODEV:
+                if ex.errno == errno.EINVAL or ex.errno == errno.ENODEV:
                     # Perhaps the file was a pipe, i.e. "... | bup split ..."
                     return None
                 raise ex