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

Unified Diff: boto/pyami/bootstrap.py

Issue 8386013: Merging in latest boto. (Closed) Base URL: svn://svn.chromium.org/boto
Patch Set: Redoing vendor drop by deleting and then merging. Created 9 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 | « boto/provider.py ('k') | boto/pyami/config.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: boto/pyami/bootstrap.py
diff --git a/boto/pyami/bootstrap.py b/boto/pyami/bootstrap.py
index c1441fd2840df716ca3d4606fe246b1dacd1f1b7..cd44682fc86026531457865d4c1a738aa1950506 100644
--- a/boto/pyami/bootstrap.py
+++ b/boto/pyami/bootstrap.py
@@ -24,6 +24,7 @@ import boto
from boto.utils import get_instance_metadata, get_instance_userdata
from boto.pyami.config import Config, BotoConfigPath
from boto.pyami.scriptbase import ScriptBase
+import time
class Bootstrap(ScriptBase):
"""
@@ -75,7 +76,15 @@ class Bootstrap(ScriptBase):
self.run('svn update %s %s' % (version, location))
elif update.startswith('git'):
location = boto.config.get('Boto', 'boto_location', '/usr/share/python-support/python-boto/boto')
- self.run('git pull', cwd=location)
+ num_remaining_attempts = 10
+ while num_remaining_attempts > 0:
+ num_remaining_attempts -= 1
+ try:
+ self.run('git pull', cwd=location)
+ num_remaining_attempts = 0
+ except Exception, e:
+ boto.log.info('git pull attempt failed with the following exception. Trying again in a bit. %s', e)
+ time.sleep(2)
if update.find(':') >= 0:
method, version = update.split(':')
else:
« no previous file with comments | « boto/provider.py ('k') | boto/pyami/config.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698