diff options
author | Mike Frysinger <vapier@chromium.org> | 2014-12-08 01:35:05 -0500 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-12-09 09:11:20 +0000 |
commit | cc5aa647d44bbd972537da6a1b19fb612e80920d (patch) | |
tree | 98a6778f44e97a27c30387b34a13685aed1546ea /cbuildbot/repository.py | |
parent | 82d3120f87f87582bf2ea9ed0e0bb49ab10f9f8a (diff) | |
download | chromite-cc5aa647d44bbd972537da6a1b19fb612e80920d.tar.gz |
lint: cbuildbot: clean up a bit
Mostly a focus on bad whitespace, but also drop some obsolete warnings.
BUG=chromium:431514
TEST=no more lint errors
TEST=`./cbuildbot/run_tests` passes
Change-Id: Ie94bd5d6b2abf3a37cfc51e0af1d1abe815fcdac
Reviewed-on: https://chromium-review.googlesource.com/233840
Reviewed-by: Aviv Keshet <akeshet@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Diffstat (limited to 'cbuildbot/repository.py')
-rw-r--r-- | cbuildbot/repository.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/cbuildbot/repository.py b/cbuildbot/repository.py index b2ba4db15..727350f3e 100644 --- a/cbuildbot/repository.py +++ b/cbuildbot/repository.py @@ -4,8 +4,6 @@ """Repository module to handle different types of repositories.""" -# pylint: disable=bad-whitespace - from __future__ import print_function import constants @@ -20,13 +18,13 @@ from chromite.lib import osutils from chromite.lib import rewrite_git_alternates from chromite.lib import retry_util + # File that marks a buildroot as being used by a trybot _TRYBOT_MARKER = '.trybot' class SrcCheckOutException(Exception): """Exception gets thrown for failure to sync sources""" - pass def IsARepoRoot(directory): @@ -112,6 +110,7 @@ def CreateTrybotMarker(buildroot): """Create the file that identifies a buildroot as being used by a trybot.""" osutils.WriteFile(GetTrybotMarkerPath(buildroot), '') + def ClearBuildRoot(buildroot, preserve_paths=()): """Remove and recreate the buildroot while preserving the trybot marker.""" trybot_root = os.path.exists(GetTrybotMarkerPath(buildroot)) @@ -383,7 +382,7 @@ class RepoRepository(object): repo_path = os.path.join(self.directory, '.repo', 'projects') current = set(cros_build_lib.RunCommand( ['find', repo_path, '-type', 'd', '-name', '*.git', '-printf', '%P\n', - '-a', '!', '-wholename', '*.git/*', '-prune'], + '-a', '!', '-wholename', '*.git/*', '-prune'], print_cmd=False, capture_output=True).output.splitlines()) data = {}.fromkeys(current, 0) |