diff options
Diffstat (limited to 'morphlib/morph2.py')
-rw-r--r-- | morphlib/morph2.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/morphlib/morph2.py b/morphlib/morph2.py index 0e0d9201..fd72aa94 100644 --- a/morphlib/morph2.py +++ b/morphlib/morph2.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2013 Codethink Limited +# Copyright (C) 2012-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 @@ -14,7 +14,6 @@ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -import copy import re import morphlib @@ -45,7 +44,7 @@ class Morphology(object): ('install-commands', None), ('post-install-commands', None), ('devices', None), - ('chunks', []), + ('products', []), ('max-jobs', None), ('build-system', 'manual') ], @@ -87,6 +86,14 @@ class Morphology(object): def __contains__(self, key): return key in self._dict + # Not covered by tests, since it's trivial, morph2 is going away + # and only exists so the new morphology validation code can use it. + def get(self, key, default=None): # pragma: no cover + try: + return self[key] + except KeyError: + return default + def get_commands(self, which): '''Return the commands to run from a morphology or the build system''' if self[which] is None: |