mirror of
https://github.com/borgbackup/borg.git
synced 2024-12-30 19:57:42 +00:00
Catch a ValueError when checking if a user exists
This commit is contained in:
parent
91a9c35bd3
commit
ff108ef24b
1 changed files with 1 additions and 1 deletions
|
@ -40,7 +40,7 @@ def user_exists(username):
|
||||||
try:
|
try:
|
||||||
pwd.getpwnam(username)
|
pwd.getpwnam(username)
|
||||||
return True
|
return True
|
||||||
except KeyError:
|
except (KeyError, ValueError):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue