diff options
author | Daniel Firth <dan.firth@codethink.co.uk> | 2013-10-31 14:28:12 +0000 |
---|---|---|
committer | Daniel Firth <dan.firth@codethink.co.uk> | 2013-11-01 15:27:10 +0000 |
commit | 6a1d074bfd30d5d24faf02725542ec87509c310a (patch) | |
tree | 5a4e9458fcfd5f57e749e807161d8f6c1a704119 /morphlib | |
parent | 2d16996377f369c97d35b7b48bdd336c2e8f5a08 (diff) | |
download | morph-6a1d074bfd30d5d24faf02725542ec87509c310a.tar.gz |
Added scenario test to prevent morph edit from being used without a system argument
Diffstat (limited to 'morphlib')
-rw-r--r-- | morphlib/plugins/branch_and_merge_new_plugin.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/morphlib/plugins/branch_and_merge_new_plugin.py b/morphlib/plugins/branch_and_merge_new_plugin.py index dba529d9..9c4cd53e 100644 --- a/morphlib/plugins/branch_and_merge_new_plugin.py +++ b/morphlib/plugins/branch_and_merge_new_plugin.py @@ -443,6 +443,8 @@ class SimpleBranchAndMergePlugin(cliapp.Plugin): logging.debug('Loading system morphology') system_morph = loader.load_from_file( sb.get_filename(sb.root_repository_url, system_name + '.morph')) + if system_morph['kind'] != 'system': + raise cliapp.AppException("%s is not a system" % system_name) system_morph.repo_url = sb.root_repository_url system_morph.ref = sb.system_branch_name system_morph.filename = system_name + '.morph' |