diff options
author | Eric Boren <borenet@google.com> | 2018-07-19 13:27:49 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-07-19 17:53:25 +0000 |
commit | 8c172ba397087850e9c4949a42ae558ebc6fdaf4 (patch) | |
tree | ffbda04524e34f8807057334a87241b0f0fac9a0 /infra/bots/assets/asset_utils.py | |
parent | 63fac808ee5a6b33f15de2aa54a507a1334a053e (diff) |
[infra] Add infra support for Lottie
Bug: skia:8136
Change-Id: I18c4ad549c52346ebfe23d172597d5da205e5c4d
Reviewed-on: https://skia-review.googlesource.com/142105
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Diffstat (limited to 'infra/bots/assets/asset_utils.py')
-rw-r--r-- | infra/bots/assets/asset_utils.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/infra/bots/assets/asset_utils.py b/infra/bots/assets/asset_utils.py index 59d7ca0e44..e86035efa0 100644 --- a/infra/bots/assets/asset_utils.py +++ b/infra/bots/assets/asset_utils.py @@ -73,11 +73,9 @@ class CIPDStore(object): # Enable automatic GCE authentication. For context see # https://bugs.chromium.org/p/skia/issues/detail?id=6385#c3 cipd_args.extend(['-service-account-json', ':gce']) - subprocess.check_call( - [self._cipd] - + cmd - + cipd_args - ) + return subprocess.check_output( + [self._cipd] + cmd + cipd_args, + stderr=subprocess.STDOUT) def _json_output(self, cmd): """Run the given command, return the JSON output.""" @@ -89,7 +87,12 @@ class CIPDStore(object): return parsed.get('result', []) def _search(self, pkg_name): - res = self._json_output(['search', pkg_name, '--tag', TAG_PROJECT_SKIA]) + try: + res = self._json_output(['search', pkg_name, '--tag', TAG_PROJECT_SKIA]) + except subprocess.CalledProcessError as e: + if 'no such package' in e.output: + return [] + raise return [r['instance_id'] for r in res] def _describe(self, pkg_name, instance_id): |