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:
anodelman@mozilla.com 2008-01-24 14:20:15 -08:00
Родитель 4629fe13a9
Коммит efe4e7fbec
1 изменённых файлов: 10 добавлений и 4 удалений

Просмотреть файл

@ -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)