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:
parent
cb4524e34f
commit
692647ed86
1 changed files with 8 additions and 2 deletions
|
@ -178,8 +178,14 @@ for hdir in homedirs:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
user["name"] = pwentry.pw_gecos
|
user["name"] = pwentry.pw_gecos
|
||||||
user["has_public_html"] = (hdir / "public_html").is_dir()
|
try:
|
||||||
user["has_public_git"] = (hdir / "public_git").is_dir()
|
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(
|
user["email_hash"] = hashlib.md5(
|
||||||
f"{user['name'].lower()}@fedoraproject.org".encode("utf-8")
|
f"{user['name'].lower()}@fedoraproject.org".encode("utf-8")
|
||||||
).hexdigest()
|
).hexdigest()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue