Ver Fonte

Catch a ValueError when checking if a user exists

Lee Bousfield há 9 anos atrás
pai
commit
ff108ef24b
1 ficheiros alterados com 1 adições e 1 exclusões
  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