Browse Source

Catch a ValueError when checking if a user exists

Lee Bousfield 9 năm trước cách đây
mục cha
commit
ff108ef24b
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/borg/testsuite/platform.py

+ 1 - 1
src/borg/testsuite/platform.py

@@ -40,7 +40,7 @@ def user_exists(username):
     try:
         pwd.getpwnam(username)
         return True
-    except KeyError:
+    except (KeyError, ValueError):
         return False