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

Unified Diff: appengine/cr-buildbucket/config.py

Issue 2158953002: swarmbucket: add $project template parameter (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Created 4 years, 5 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 | « appengine/cr-buildbucket/acl.py ('k') | appengine/cr-buildbucket/swarming/swarming.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/cr-buildbucket/config.py
diff --git a/appengine/cr-buildbucket/config.py b/appengine/cr-buildbucket/config.py
index 7af4e45c4483e43f1a08b88f096a41d7947aae49..515dcebbd8eed4a662e59362be369448b97fdadd 100644
--- a/appengine/cr-buildbucket/config.py
+++ b/appengine/cr-buildbucket/config.py
@@ -140,11 +140,12 @@ def get_buckets_async():
@ndb.non_transactional
@ndb.tasklet
def get_bucket_async(name):
- """Returns a project_config_pb2.Bucket by name."""
+ """Returns a (project, project_config_pb2.Bucket) tuple."""
bucket = yield Bucket.get_by_id_async(name)
if bucket is None:
- raise ndb.Return(None)
- raise ndb.Return(parse_bucket_config(bucket.config_content))
+ raise ndb.Return(None, None)
+ raise ndb.Return(
+ bucket.project_id, parse_bucket_config(bucket.config_content))
def cron_update_buckets():
« no previous file with comments | « appengine/cr-buildbucket/acl.py ('k') | appengine/cr-buildbucket/swarming/swarming.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698