Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Paul Eggleton <paul.eggleton@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH] buildhistory_analysis: fix broken list length checks
Date: Thu,  6 Dec 2012 11:11:51 +0000	[thread overview]
Message-ID: <1354792311-17216-1-git-send-email-paul.eggleton@linux.intel.com> (raw)

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

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 meta/lib/oe/buildhistory_analysis.py |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/lib/oe/buildhistory_analysis.py b/meta/lib/oe/buildhistory_analysis.py
index ad57f00..7b5ee45 100644
--- a/meta/lib/oe/buildhistory_analysis.py
+++ b/meta/lib/oe/buildhistory_analysis.py
@@ -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
-- 
1.7.10.4




                 reply	other threads:[~2012-12-06 11:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1354792311-17216-1-git-send-email-paul.eggleton@linux.intel.com \
    --to=paul.eggleton@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox