소스 검색

Merge pull request #1963 from ThomasWaldmann/fix-win10-lxsys-tests

catch errno.ENOSYS for mknod (win 10 lxsys)
enkore 8 년 전
부모
커밋
20d3eff8c4
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:
         except PermissionError:
             have_root = False
             have_root = False
         except OSError as e:
         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
                 raise
             have_root = False
             have_root = False
         return have_root
         return have_root