diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2014-02-14 13:24:07 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2014-02-14 13:40:27 +0000 |
commit | d036610974f229a806d682c6d051c299f6396d2f (patch) | |
tree | e537cb29fa6b913c98106a2d5d3c37af4fd157ee /scripts/yaml-extract | |
parent | ec9c9632970dc817a13ab954c3e4d86ad8731527 (diff) | |
download | morph-d036610974f229a806d682c6d051c299f6396d2f.tar.gz |
yarns: Ensure machine altered morphologies don't include repo/ref
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: |