]> code.ossystems Code Review - openembedded-core.git/commitdiff
buildhistory_analysis: correctly handle whitespace when splitting lists
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Thu, 19 Jan 2012 10:32:10 +0000 (10:32 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 19 Jan 2012 14:31:15 +0000 (14:31 +0000)
Don't specify any argument to the split() function when handling changes
to list type variables (e.g. PACKAGES) so that the values are split by
any whitespace and only split once for a block of multiple whitespace
characters.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oe/buildhistory_analysis.py

index d3c0448fd18271fe7b5ca245fd5cf8ad4e482c32..a2fa6430774405caa11465b8dde54efca5dd1d00 100644 (file)
@@ -34,8 +34,8 @@ class ChangeRecord:
 
     def __str__(self):
         if self.fieldname in list_fields:
-            aitems = self.oldvalue.split(' ')
-            bitems = self.newvalue.split(' ')
+            aitems = self.oldvalue.split()
+            bitems = self.newvalue.split()
             removed = list(set(aitems) - set(bitems))
             added = list(set(bitems) - set(aitems))
             return '%s: %s:%s%s' % (self.path, self.fieldname, ' removed "%s"' % ' '.join(removed) if removed else '', ' added "%s"' % ' '.join(added) if added else '')