Explorar el Código

Catch a ValueError when checking if a user exists

Lee Bousfield hace 9 años
padre
commit
ff108ef24b
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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