diff options
author | Robert Yang <liezhi.yang@windriver.com> | 2017-08-21 18:23:09 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-08-23 14:16:01 +0100 |
commit | f4d4bfd2b7cd7e3b4ff6dcb92964b9ddb9db78af (patch) | |
tree | 1351fcadf4ba610c21bdf35fc11ea0efec615de3 | |
parent | 20704967f6436f34fa24bc9d1f477bc356b4eb9a (diff) | |
download | poky-f4d4bfd2b7cd7e3b4ff6dcb92964b9ddb9db78af.tar.gz |
utils/logparser.py: fix section check
The section might be None or '', so use "if section" for it.
Fixed:
File "/buildarea/lyang1/poky/meta/lib/oeqa/utils/logparser.py", line 113, in log_as_files
prefix += section
TypeError: Can't convert 'NoneType' object to str implicitly
[YOCTO #11547]
(From OE-Core rev: 320ea01f9eb33df462534bf08488ff6ada9bbe7b)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/lib/oeqa/utils/logparser.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/lib/oeqa/utils/logparser.py b/meta/lib/oeqa/utils/logparser.py index 4355ce0b76..0670627c3c 100644 --- a/meta/lib/oeqa/utils/logparser.py +++ b/meta/lib/oeqa/utils/logparser.py | |||
@@ -109,7 +109,7 @@ class Result(object): | |||
109 | prefix = '' | 109 | prefix = '' |
110 | for x in test_status: | 110 | for x in test_status: |
111 | prefix +=x+'.' | 111 | prefix +=x+'.' |
112 | if (section != ''): | 112 | if section: |
113 | prefix += section | 113 | prefix += section |
114 | section_file = os.path.join(target_dir, prefix) | 114 | section_file = os.path.join(target_dir, prefix) |
115 | # purge the file contents if it exists | 115 | # purge the file contents if it exists |