people: when making the people page account for home directory we can't get into

Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
This commit is contained in:
Pierre-Yves Chibon 2021-04-07 10:50:49 +02:00 committed by pingou
parent cb4524e34f
commit 692647ed86

View file

@ -178,8 +178,14 @@ for hdir in homedirs:
continue
user["name"] = pwentry.pw_gecos
user["has_public_html"] = (hdir / "public_html").is_dir()
user["has_public_git"] = (hdir / "public_git").is_dir()
try:
user["has_public_html"] = (hdir / "public_html").is_dir()
except PermissionError:
user["has_public_html"] = False
try:
user["has_public_git"] = (hdir / "public_git").is_dir()
except PermissionError:
user["has_public_git"] = False
user["email_hash"] = hashlib.md5(
f"{user['name'].lower()}@fedoraproject.org".encode("utf-8")
).hexdigest()