зеркало из https://github.com/mozilla/gecko-dev.git
Bug 413913 - fix for failure to catch chmod exceptions in ffprofile_win32 a=anodelman, r=rcampbell (Bustage fix for current tree redness)
This commit is contained in:
Родитель
4629fe13a9
Коммит
efe4e7fbec
|
@ -45,7 +45,13 @@ def MakeDirectoryContentsWritable(dirname):
|
|||
dirname: Name of the directory to make contents writable.
|
||||
"""
|
||||
|
||||
for (root, dirs, files) in os.walk(dirname):
|
||||
os.chmod(root, 0777)
|
||||
for filename in files:
|
||||
os.chmod(os.path.join(root, filename), 0777)
|
||||
try:
|
||||
for (root, dirs, files) in os.walk(dirname):
|
||||
os.chmod(root, 0777)
|
||||
for filename in files:
|
||||
try:
|
||||
os.chmod(os.path.join(root, filename), 0777)
|
||||
except OSError, (errno, strerror):
|
||||
print 'WARNING: failed to os.chmod(%s): %s : %s' % (os.path.join(root, filename), errno, strerror)
|
||||
except OSError, (errno, strerror):
|
||||
print 'WARNING: failed to MakeDirectoryContentsWritable: %s : %s' % (errno, strerror)
|
||||
|
|
Загрузка…
Ссылка в новой задаче