diff options
author | Frazer Clews <frazer.clews@codethink.co.uk> | 2020-01-16 17:11:19 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-01-19 13:31:05 +0000 |
commit | fa5524890e86d353ee7d2194ccdd6c84e9bd2d31 (patch) | |
tree | f3d46ddbd5dd2b772a727b04303bb97b8ae43b9b /bitbake/lib/bb/ui/buildinfohelper.py | |
parent | 0ac5174c7d39a3e49893df0d517d47bec1935555 (diff) | |
download | poky-fa5524890e86d353ee7d2194ccdd6c84e9bd2d31.tar.gz |
bitbake: lib: amend code to use proper singleton comparisons where possible
amend the code to handle singleton comparisons properly so it only checks
if they only refer to the same object or not, and not bother
comparing the values.
(Bitbake rev: b809a6812aa15a8a9af97bc382cc4b19571e6bfc)
Signed-off-by: Frazer Clews <frazer.clews@codethink.co.uk>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui/buildinfohelper.py')
-rw-r--r-- | bitbake/lib/bb/ui/buildinfohelper.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py index 5cbca97f3f..82c62e3324 100644 --- a/bitbake/lib/bb/ui/buildinfohelper.py +++ b/bitbake/lib/bb/ui/buildinfohelper.py | |||
@@ -935,7 +935,7 @@ class BuildInfoHelper(object): | |||
935 | 935 | ||
936 | # only reset the build name if the one on the server is actually | 936 | # only reset the build name if the one on the server is actually |
937 | # a valid value for the build_name field | 937 | # a valid value for the build_name field |
938 | if build_name != None: | 938 | if build_name is not None: |
939 | build_info['build_name'] = build_name | 939 | build_info['build_name'] = build_name |
940 | changed = True | 940 | changed = True |
941 | 941 | ||
@@ -1194,7 +1194,7 @@ class BuildInfoHelper(object): | |||
1194 | evdata = BuildInfoHelper._get_data_from_event(event) | 1194 | evdata = BuildInfoHelper._get_data_from_event(event) |
1195 | 1195 | ||
1196 | for t in self.internal_state['targets']: | 1196 | for t in self.internal_state['targets']: |
1197 | if t.is_image == True: | 1197 | if t.is_image: |
1198 | output_files = list(evdata.keys()) | 1198 | output_files = list(evdata.keys()) |
1199 | for output in output_files: | 1199 | for output in output_files: |
1200 | if t.target in output and 'rootfs' in output and not output.endswith(".manifest"): | 1200 | if t.target in output and 'rootfs' in output and not output.endswith(".manifest"): |
@@ -1236,7 +1236,7 @@ class BuildInfoHelper(object): | |||
1236 | task_information['outcome'] = Task.OUTCOME_PREBUILT | 1236 | task_information['outcome'] = Task.OUTCOME_PREBUILT |
1237 | else: | 1237 | else: |
1238 | task_information['task_executed'] = True | 1238 | task_information['task_executed'] = True |
1239 | if 'noexec' in vars(event) and event.noexec == True: | 1239 | if 'noexec' in vars(event) and event.noexec: |
1240 | task_information['task_executed'] = False | 1240 | task_information['task_executed'] = False |
1241 | task_information['outcome'] = Task.OUTCOME_EMPTY | 1241 | task_information['outcome'] = Task.OUTCOME_EMPTY |
1242 | task_information['script_type'] = Task.CODING_NA | 1242 | task_information['script_type'] = Task.CODING_NA |
@@ -1776,7 +1776,7 @@ class BuildInfoHelper(object): | |||
1776 | image_file_extensions_unique = {} | 1776 | image_file_extensions_unique = {} |
1777 | image_fstypes = self.server.runCommand( | 1777 | image_fstypes = self.server.runCommand( |
1778 | ['getVariable', 'IMAGE_FSTYPES'])[0] | 1778 | ['getVariable', 'IMAGE_FSTYPES'])[0] |
1779 | if image_fstypes != None: | 1779 | if image_fstypes is not None: |
1780 | image_types_str = image_fstypes.strip() | 1780 | image_types_str = image_fstypes.strip() |
1781 | image_file_extensions = re.sub(r' {2,}', ' ', image_types_str) | 1781 | image_file_extensions = re.sub(r' {2,}', ' ', image_types_str) |
1782 | image_file_extensions_unique = set(image_file_extensions.split(' ')) | 1782 | image_file_extensions_unique = set(image_file_extensions.split(' ')) |