buildhistory_analysis: fix broken list length checks

Fix erroneous use of .count instead of len(), which unfortunately is not
reported by Python as an error in a numeric comparison.

(From OE-Core rev: 63fd76190f503660119dcc8efdcfc6fbff406c26)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Paul Eggleton 2012-12-06 11:11:51 +00:00 committed by Richard Purdie
parent 97a91e81ea
commit b660a10e47
1 changed files with 2 additions and 2 deletions

View File

@ -185,7 +185,7 @@ def blob_to_dict(blob):
adict = {}
for line in alines:
splitv = [i.strip() for i in line.split('=',1)]
if splitv.count > 1:
if len(splitv) > 1:
adict[splitv[0]] = splitv[1]
return adict
@ -231,7 +231,7 @@ def compare_file_lists(alines, blines):
filechanges.append(FileChange(path, FileChange.changetype_ownergroup, oldvalue, newvalue))
# Check symlink target
if newsplitv[0][0] == 'l':
if splitv.count > 3:
if len(splitv) > 3:
oldvalue = splitv[3]
else:
oldvalue = None