Explorar el Código

Merge pull request #1368 from PlasmaPower/user-exists-value-error

Catch a ValueError when checking if a user exists
enkore hace 8 años
padre
commit
3c2d41898f
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