diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2014-02-17 14:28:15 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2014-02-17 14:28:15 +0000 |
commit | a859a3377f488ef11ebed2631dbd51b2aa82afe4 (patch) | |
tree | d6c141557430c6a808abd80c9fdbf26c44ba1eea /scripts/yaml-extract | |
parent | 8f8fc96b884e7f175d4a01bc2d91452d7149bf33 (diff) | |
parent | d036610974f229a806d682c6d051c299f6396d2f (diff) | |
download | morph-a859a3377f488ef11ebed2631dbd51b2aa82afe4.tar.gz |
Merge remote-tracking branch 'origin/baserock/richardmaw/10312/ensure-not-add-repo-ref'
This includes a typo fix of Unpertify -> Unpetrify
Reviewed-by: Lars Wirzenius
Diffstat (limited to 'scripts/yaml-extract')
-rwxr-xr-x | scripts/yaml-extract | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/yaml-extract b/scripts/yaml-extract index 5a945b6d..6f55e62f 100755 --- a/scripts/yaml-extract +++ b/scripts/yaml-extract @@ -28,7 +28,7 @@ # values for missing fields (e.g., the morph field if name is given). # Construct your tests accordingly. -# Copyright (C) 2013 Codethink Limited +# Copyright (C) 2013-2014 Codethink Limited # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -52,6 +52,8 @@ with open(sys.argv[1]) as f: obj = yaml.safe_load(f) for thing in sys.argv[2:]: if type(obj) == dict: + if thing not in obj: + raise Exception("Object does not contain %s" % thing) obj = obj[thing] elif type(obj) == list: if '=' in thing: |