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

Unified Diff: bin/cbuildbot.py

Issue 3116029: Fix cbuildbot. Mistakenly used str.open instead of open (Closed) Base URL: ssh://git@chromiumos-git//crosutils.git
Patch Set: nits Created 10 years, 4 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: bin/cbuildbot.py
diff --git a/bin/cbuildbot.py b/bin/cbuildbot.py
index d09529ef48f5b9e145c9fa89962f6cc0e8d60381..da99f5b243d106a2b2c8e392c69da057a862acf7 100755
--- a/bin/cbuildbot.py
+++ b/bin/cbuildbot.py
@@ -13,7 +13,7 @@ import sys
from cbuildbot_config import config
-_DEFAULT_RETRIES=3
+_DEFAULT_RETRIES = 3
# Utility functions
@@ -68,9 +68,9 @@ def RepoSync(buildroot, rw_checkout, retries=_DEFAULT_RETRIES):
except:
retries -= 1
if retries > 0:
- print >>sys.stderr, 'CBUILDBOT -- Repo Sync Failed, retrying'
+ print >> sys.stderr, 'CBUILDBOT -- Repo Sync Failed, retrying'
else:
- print >>sys.stderr, 'CBUILDBOT -- Retries exhausted'
+ print >> sys.stderr, 'CBUILDBOT -- Retries exhausted'
raise
# Main functions
@@ -108,9 +108,13 @@ def _UprevAllPackages(buildroot):
def _UprevPackages(buildroot, revisionfile):
revisions = None
if (revisionfile):
- rev_file = revisionfile.open(revisionfile)
- revisions = rev_file.read()
- rev_file.close()
+ try:
+ rev_file = open(revisionfile)
+ revisions = rev_file.read()
+ rev_file.close()
+ except:
+ print >> sys.stderr, 'Error reading %s' % revisionfile
+ revisions = None
# Note: Revisions == "None" indicates a Force Build.
if revisions and revisions != 'None':
« 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