summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Sherwood <paul.sherwood@codethink.co.uk>2016-03-07 08:01:24 +0000
committerPaul Sherwood <paul.sherwood@codethink.co.uk>2016-03-07 08:01:24 +0000
commit493a3b16ff3736c7b0c2039399dddbae4dae8fd0 (patch)
tree832b33aedb8cb8a7027faa090bf3e34f0397ed5a
parentad8d2457c94c7b8e2032a21f9b9fa4bd7ab4d4cb (diff)
downloadybd-493a3b16ff3736c7b0c2039399dddbae4dae8fd0.tar.gz
Better fix for mis-typed arch
-rwxr-xr-xybd/__main__.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/ybd/__main__.py b/ybd/__main__.py
index 487e350..059749f 100755
--- a/ybd/__main__.py
+++ b/ybd/__main__.py
@@ -52,6 +52,12 @@ with app.timer('TOTAL'):
defs = Definitions()
with app.timer('CACHE-KEYS', 'cache-key calculations'):
cache.cache_key(defs, app.config['target'])
+
+ target = defs.get(app.config['target'])
+ if app.config['total'] == 0 or (app.config['total'] == 1 and
+ target.get('kind') == 'cluster'):
+ app.exit('ARCH', 'ERROR: no definitions found for', app.config['arch'])
+
defs.save_trees()
sandbox.executor = sandboxlib.executor_for_platform()
@@ -63,7 +69,6 @@ with app.timer('TOTAL'):
if app.config.get('instances'):
app.spawn()
- target = defs.get(app.config['target'])
while True:
try:
compose(defs, target)