mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 12:25:53 +00:00
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:
parent
4629fe13a9
commit
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)
|
||||
|
Loading…
Reference in New Issue
Block a user