diff options
author | bst-marge-bot <marge-bot@buildstream.build> | 2019-07-08 19:09:33 +0000 |
---|---|---|
committer | bst-marge-bot <marge-bot@buildstream.build> | 2019-07-08 19:09:33 +0000 |
commit | cc8abc150351a08a17c93e77ea90cdac01886f1f (patch) | |
tree | c2d1133ca4a89f1afd2d09eb9389f3d16ef3bf38 | |
parent | cf0516ba92fb4a220ae0086c411314cec4974df5 (diff) | |
parent | b1796680dd26c9a9eafdd6d4d73fd136a30a9f69 (diff) | |
download | buildstream-cc8abc150351a08a17c93e77ea90cdac01886f1f.tar.gz |
Merge branch 'juerg/yaml-synthetic-file-index' into 'master'
_yaml.pyx: Fix file index checks for synthetic nodes
Closes #1051
See merge request BuildStream/buildstream!1457
-rw-r--r-- | src/buildstream/_yaml.pyx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/buildstream/_yaml.pyx b/src/buildstream/_yaml.pyx index 678374272..b1fee9be3 100644 --- a/src/buildstream/_yaml.pyx +++ b/src/buildstream/_yaml.pyx @@ -114,7 +114,7 @@ cdef class ProvenanceInformation: cdef FileInfo fileinfo self.node = nodeish - if (nodeish is None) or (nodeish.file_index is None): + if (nodeish is None) or (nodeish.file_index == _SYNTHETIC_FILE_INDEX): self.filename = "" self.shortname = "" self.displayname = "" @@ -436,7 +436,7 @@ cpdef Node load_data(str data, int file_index=_SYNTHETIC_FILE_INDEX, str file_na .format(type(contents[0]).__name__, file_name)) # Store this away because we'll use it later for "top level" provenance - if file_index is not None: + if file_index != _SYNTHETIC_FILE_INDEX: f_info = <FileInfo> _FILE_LIST[file_index] _FILE_LIST[file_index] = FileInfo( |