Merge pull request #5071 from mvdbeek/installation_fixes

[BUG][17.09] Ignore OSError when chmod'ing integrated_tool_panel_conf.xml
This commit is contained in:
John Chilton
2017-11-24 15:17:23 -05:00
committed by GitHub
+6 -1
View File
@@ -103,4 +103,9 @@ class ManagesIntegratedToolPanelMixin:
shutil.copy(filename, filename + ".copy")
filename = filename + ".copy"
shutil.move(filename, destination)
os.chmod(self._integrated_tool_panel_config, 0o644)
try:
os.chmod(destination, 0o644)
except OSError:
# That can happen if multiple threads are simultaneously moving/chmod'ing this file
# Should be harmless, though this race condition should be avoided.
pass