Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(287)

Unified Diff: webkit/tools/layout_tests/layout_package/failure_finder.py

Issue 341059: Changes the layout test formatter to apply lenient permissions on created fil... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/layout_tests/layout_package/failure_finder.py
===================================================================
--- webkit/tools/layout_tests/layout_package/failure_finder.py (revision 29832)
+++ webkit/tools/layout_tests/layout_package/failure_finder.py (working copy)
@@ -142,7 +142,7 @@
This will create directories recursively until the given dir exists.
"""
if not os.path.exists(dir):
- os.makedirs(dir)
+ os.makedirs(dir, 0777)
def ExtractFirstValue(string, regex):
m = re.search(regex, string)
@@ -452,13 +452,14 @@
extracted_file_path = os.path.join(base_dir, name)
try:
(path, filename) = os.path.split(extracted_file_path)
- os.makedirs(path)
+ os.makedirs(path, 0777)
except:
pass
outfile = open(extracted_file_path, 'wb')
outfile.write(zip.read(name))
outfile.flush()
outfile.close()
+ os.chmod(extracted_file_path, 0777)
def _GetRevisionAndBuildFromArchiveStep(self):
if self.archive_step_log_file:
@@ -789,6 +790,7 @@
localFile = open(file_to_create, "w%s" % modifiers)
localFile.write(zip.read(file_in_zip))
localFile.close()
+ os.chmod(file_to_create, 0777)
return True
except KeyError:
print "File %s does not exist in zip file." % (file_in_zip)
@@ -818,6 +820,7 @@
localFile.write(webFile.read())
webFile.close()
localFile.close()
+ os.chmod(local_filename, 0777)
except urllib2.HTTPError:
return None
except urllib2.URLError:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698