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

Unified Diff: client/swarming.py

Issue 2412513003: Don't assume existence of dimensions when querying for Swarming bots (Closed)
Patch Set: Created 4 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/swarming.py
diff --git a/client/swarming.py b/client/swarming.py
index c98f36449f8c91a45065e88e0652145e9b0b96e3..e1a511e3b0bfa942c5ed9a51705360c5e0875eff 100755
--- a/client/swarming.py
+++ b/client/swarming.py
@@ -1150,7 +1150,7 @@ def CMDbots(parser, args):
# If the user requested to filter on dimensions, ensure the bot has all the
# dimensions requested.
- dimensions = {i['key']: i.get('value') for i in bot['dimensions']}
+ dimensions = {i['key']: i.get('value') for i in bot.get('dimensions', {})}
for key, value in options.dimensions:
if key not in dimensions:
break
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698