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

Unified Diff: appengine/cr-buildbucket/swarming/swarmingcfg.py

Issue 2160913003: swarmbucket: fix empty dimension value (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: add swarmbucketbuilders test 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
Index: appengine/cr-buildbucket/swarming/swarmingcfg.py
diff --git a/appengine/cr-buildbucket/swarming/swarmingcfg.py b/appengine/cr-buildbucket/swarming/swarmingcfg.py
index 4ff71914ccd85865579406a61463bfea6285ce94..a0b8c392148b33a4163255fb9621a57aaf332801 100644
--- a/appengine/cr-buildbucket/swarming/swarmingcfg.py
+++ b/appengine/cr-buildbucket/swarming/swarmingcfg.py
@@ -30,7 +30,7 @@ def validate_dimensions(field_name, dimensions, ctx):
if len(components) != 2:
ctx.error('does not have ":"')
continue
- key, value = components
+ key, _ = components
if not key:
ctx.error('no key')
else:
@@ -42,8 +42,6 @@ def validate_dimensions(field_name, dimensions, ctx):
ctx.error('duplicate key %s', key)
else:
known_keys.add(key)
- if not value:
- ctx.error('no value')
def validate_recipe_cfg(recipe, common_recipe, ctx):
@@ -139,5 +137,6 @@ def validate_cfg(swarming, ctx):
b, ctx, bucket_has_pool_dim=has_pool_dim,
common_recipe=common_recipe)
+
def has_pool_dimension(dimensions):
return any(d.startswith('pool:') for d in dimensions)
« no previous file with comments | « appengine/cr-buildbucket/swarming/swarming.py ('k') | appengine/cr-buildbucket/swarming/test/swarming_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698