mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-04 11:51:14 +02:00
Fix cbuildbot. Mistakenly used str.open instead of open
TEST=Test underway. Review URL: http://codereview.chromium.org/3116029
This commit is contained in:
parent
2e9e668dc0
commit
a8a4803f4f
@ -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':
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user