Skip to content

Commit e0bda11

Browse files
committed
FIX: Sometimes output directories are not owned by the script.
1 parent d3e5f24 commit e0bda11

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

build_docs.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,10 @@ def build_one(version, isdev, quick, sphinxbuild, build_root, www_root,
178178
os.makedirs(target, exist_ok=True)
179179
try:
180180
os.chmod(target, 0o775)
181-
except PermissionError as err:
182-
logging.warning("Can't chmod %s: %s", target, str(err))
183-
shell_out("chgrp -R {group} {file}".format(group=group, file=target))
181+
shell_out("chgrp -R {group} {file}".format(group=group, file=target))
182+
except (PermissionError, subprocess.CalledProcessError) as err:
183+
logging.warning("Can't change mod or group of %s: %s",
184+
target, str(err))
184185
logging.info("Doc autobuild started in %s", checkout)
185186
os.chdir(checkout)
186187

0 commit comments

Comments
 (0)