diff options
author | Jürg Billeter <j@bitron.ch> | 2017-07-19 08:09:21 +0200 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2017-07-20 07:24:56 +0200 |
commit | 6eb477ae2d3f1df8b18674ed8b795e788e11abf2 (patch) | |
tree | 9e0ecce641a12ff9783db4b65c0d6b1a5fb931ad | |
parent | 7f6ed26674bd567dd1ce63a3fe844eb6646d9c39 (diff) | |
download | buildstream-6eb477ae2d3f1df8b18674ed8b795e788e11abf2.tar.gz |
element.py: Do not fail with artifacts with pre-workspace metadata
-rw-r--r-- | buildstream/element.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/buildstream/element.py b/buildstream/element.py index f773ab739..1ec5061b8 100644 --- a/buildstream/element.py +++ b/buildstream/element.py @@ -1185,7 +1185,10 @@ class Element(Plugin): metadir = os.path.join(self.__artifacts.extract(self), 'meta') meta = _yaml.load(os.path.join(metadir, 'artifact.yaml')) - self.__workspaced_artifact = meta['workspaced'] + if 'workspaced' in meta: + self.__workspaced_artifact = meta['workspaced'] + else: + self.__workspaced_artifact = False return self.__workspaced_artifact @@ -1196,7 +1199,10 @@ class Element(Plugin): metadir = os.path.join(self.__artifacts.extract(self), 'meta') meta = _yaml.load(os.path.join(metadir, 'artifact.yaml')) - self.__workspaced_dependencies_artifact = meta['workspaced_dependencies'] + if 'workspaced_dependencies' in meta: + self.__workspaced_dependencies_artifact = meta['workspaced_dependencies'] + else: + self.__workspaced_dependencies_artifact = {} return self.__workspaced_dependencies_artifact |