1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-27 18:28:42 +00:00

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

Catch a ValueError when checking if a user exists
This commit is contained in:
enkore 2016-07-23 23:45:16 +02:00 committed by GitHub
commit 3c2d41898f

View file

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