浏览代码

catch errno.ENOSYS for mknod (win 10 lxsys)

mknod raises this when running as non-root under Windows 10's Linux Subsystem.
Thomas Waldmann 8 年之前
父节点
当前提交
61370082d6
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      borg/testsuite/archiver.py

+ 2 - 1
borg/testsuite/archiver.py

@@ -311,7 +311,8 @@ class ArchiverTestCase(ArchiverTestCaseBase):
         except PermissionError:
             have_root = False
         except OSError as e:
-            if e.errno != errno.EINVAL:
+            # Note: ENOSYS "Function not implemented" happens as non-root on Win 10 Linux Subsystem.
+            if e.errno not in (errno.EINVAL, errno.ENOSYS):
                 raise
             have_root = False
         return have_root