diff --git a/buildbot_travis/api.py b/buildbot_travis/api.py index d4d1fd4..5e00779 100644 --- a/buildbot_travis/api.py +++ b/buildbot_travis/api.py @@ -106,7 +106,7 @@ def saveConfig(self, request): if cfg != self._cfg: try: err = yield self.saveCfg(cfg) - except Exception as e: # noqa + except Exception as e: # noqa err = [repr(e)] if err is not None: self._in_progress = False diff --git a/buildbot_travis/vcs/git.py b/buildbot_travis/vcs/git.py index 9871e36..e601f95 100644 --- a/buildbot_travis/vcs/git.py +++ b/buildbot_travis/vcs/git.py @@ -17,10 +17,10 @@ from __future__ import print_function from future.moves.urllib.parse import urlparse -from buildbot.plugins import changes, util +from buildbot.plugins import changes from buildbot.steps.source.git import Git -from .base import PollerMixin, VCSBase, getCodebaseForRepository +from .base import PollerMixin, VCSBase class ParsedGitUrl(object): @@ -46,6 +46,7 @@ class GitBase(VCSBase): method = "clone" mode = "incremental" retryFetch = True + retry = (2, 10) # default retry 10 times, with 2 seconds delay def addRepository(self, factory, project=None, repository=None, branches=None, **kwargs): kwargs.update(dict( @@ -57,7 +58,8 @@ def addRepository(self, factory, project=None, repository=None, branches=None, * shallow=self.shallow, mode=self.mode, method=self.method, - retryFetch=self.retryFetch + retryFetch=self.retryFetch, + retry=self.retry )) factory.addStep(self.GitStep(**kwargs))