Skip to content

Commit 6e741bc

Browse files
committed
Add try/except
1 parent 1aae629 commit 6e741bc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/common/prometheus/multiprocessing.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,7 @@ def prepare_prom_multiproc_dir() -> None:
3030
# While `mkdir` sets mode=0o777 by default, this can be affected by umask resulting in
3131
# lesser permissions for other users. This step ensures the directory is writable for
3232
# all users.
33-
prom_dir.chmod(0o777)
33+
try:
34+
prom_dir.chmod(0o777)
35+
except PermissionError:
36+
pass

0 commit comments

Comments
 (0)