diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2015-06-02 12:42:26 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2015-06-05 13:59:31 +0000 |
commit | d8e7abe6273e2f429b1f52fb43c356e871da6aac (patch) | |
tree | e3cb7a08e5eb8f7114ac4812d23f6276f4d3e0ec /morphlib | |
parent | 0ed681e693ab7932ff839ff0270834ebb16baf1a (diff) | |
download | morph-d8e7abe6273e2f429b1f52fb43c356e871da6aac.tar.gz |
CacheKeyComputer: Only attempt to include commands present in morphology
The set of commands is potentially extendable, and it's easier to accept
optional keys than get the list of potential fields from the build
system.
Change-Id: I0d876112db43637661e9548472a9fb191ea88268
Diffstat (limited to 'morphlib')
-rw-r--r-- | morphlib/cachekeycomputer.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/morphlib/cachekeycomputer.py b/morphlib/cachekeycomputer.py index fd40dc38..fa6662cb 100644 --- a/morphlib/cachekeycomputer.py +++ b/morphlib/cachekeycomputer.py @@ -108,7 +108,8 @@ class CacheKeyComputer(object): for prefix in ('pre-', '', 'post-'): for cmdtype in ('configure', 'build', 'test', 'install'): cmd_field = prefix + cmdtype + '-commands' - keys[cmd_field] = morphology[cmd_field] + if cmd_field in morphology: + keys[cmd_field] = morphology[cmd_field] elif kind in ('system', 'stratum'): morph_dict = dict((k, morphology[k]) for k in morphology.keys()) |