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

Unified Diff: tools/archive_crash.py

Issue 350483003: Build Tools Cleanup (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: more fixes as reviewed by ricow Created 6 years, 6 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 | « tools/android_link.py ('k') | tools/build.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/archive_crash.py
diff --git a/tools/archive_crash.py b/tools/archive_crash.py
index ce2fe02cec1d140bfd63c8f4643f1207206a50a0..e7e290bf683bd69752a8d2e563ac7ef0a590dd8b 100755
--- a/tools/archive_crash.py
+++ b/tools/archive_crash.py
@@ -19,19 +19,19 @@ import uuid
GCS_FOLDER = 'dart-crashes'
-def CreateTarball(dir, tarname):
- print 'Creating tar file: %s' % (tarname)
+def CreateTarball(input_dir, tarname):
+ print 'Creating tar file: %s' % tarname
tar = tarfile.open(tarname, mode='w:gz')
- tar.add(dir)
+ tar.add(input_dir)
tar.close()
def CopyToGCS(filename):
gs_location = 'gs://%s/%s/' % (GCS_FOLDER, uuid.uuid4())
cmd = ['gsutil', 'cp', filename, gs_location]
- print 'Running command: %s' % (cmd)
+ print 'Running command: %s' % cmd
subprocess.check_call(cmd)
archived_filename = '%s%s' % (gs_location, filename.split('/').pop())
- print 'Dump now available in %s' % (archived_filename)
+ print 'Dump now available in %s' % archived_filename
def Main():
if utils.GuessOS() != 'linux':
@@ -41,7 +41,7 @@ def Main():
num_dumps = 0
for v in os.listdir('/tmp'):
if v.startswith('coredump'):
- fullpath = '/tmp/%s' % (v)
+ fullpath = '/tmp/%s' % v
if os.path.isdir(fullpath):
num_dumps += 1
tarname = '%s.tar.gz' % fullpath
@@ -49,7 +49,7 @@ def Main():
CopyToGCS(tarname)
os.unlink(tarname)
shutil.rmtree(fullpath)
- print 'Found %s core dumps' % (num_dumps)
+ print 'Found %s core dumps' % num_dumps
if __name__ == '__main__':
sys.exit(Main())
« no previous file with comments | « tools/android_link.py ('k') | tools/build.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698