Fix flake8 warnings for some files
Change-Id: If67f8660cfb0479f0e710b3566285ef401fcf077 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/355969 Tested-by: Sergiy Belozorov <sergiyb@chromium.org> Reviewed-by: Mike Frysinger <vapier@google.com>
This commit is contained in:
parent
37ae75f27d
commit
78e82ec78e
5 changed files with 33 additions and 29 deletions
|
@ -54,6 +54,7 @@ class SyncNetworkHalfResult(NamedTuple):
|
|||
# commit already present.
|
||||
remote_fetched: bool
|
||||
|
||||
|
||||
# Maximum sleep time allowed during retries.
|
||||
MAXIMUM_RETRY_SLEEP_SEC = 3600.0
|
||||
# +-10% random jitter is added to each Fetches retry sleep duration.
|
||||
|
@ -63,6 +64,7 @@ RETRY_JITTER_PERCENT = 0.1
|
|||
# TODO(vapier): Remove knob once behavior is verified.
|
||||
_ALTERNATES = os.environ.get('REPO_USE_ALTERNATES') == '1'
|
||||
|
||||
|
||||
def _lwrite(path, content):
|
||||
lock = '%s.lock' % path
|
||||
|
||||
|
@ -3415,6 +3417,7 @@ class RepoProject(MetaProject):
|
|||
except OSError:
|
||||
return 0
|
||||
|
||||
|
||||
class ManifestProject(MetaProject):
|
||||
"""The MetaProject for manifests."""
|
||||
|
||||
|
@ -3845,11 +3848,12 @@ class ManifestProject(MetaProject):
|
|||
self.config.SetBoolean('repo.superproject', use_superproject)
|
||||
|
||||
if not standalone_manifest:
|
||||
if not self.Sync_NetworkHalf(
|
||||
success = self.Sync_NetworkHalf(
|
||||
is_new=is_new, quiet=not verbose, verbose=verbose,
|
||||
clone_bundle=clone_bundle, current_branch_only=current_branch_only,
|
||||
tags=tags, submodules=submodules, clone_filter=clone_filter,
|
||||
partial_clone_exclude=self.manifest.PartialCloneExclude).success:
|
||||
partial_clone_exclude=self.manifest.PartialCloneExclude).success
|
||||
if not success:
|
||||
r = self.GetRemote()
|
||||
print('fatal: cannot obtain manifest %s' % r.url, file=sys.stderr)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue