]> git.sur5r.net Git - u-boot/commitdiff
patman: fix series-notes handling for buildman
authorAlbert ARIBAUD <albert.u.boot@aribaud.net>
Tue, 2 Feb 2016 09:24:53 +0000 (10:24 +0100)
committerSimon Glass <sjg@chromium.org>
Thu, 25 Feb 2016 04:06:19 +0000 (20:06 -0800)
A patman series with a 'Series-notes' section causes
buildman to crash with:

    self.series.notes += self.section
    TypeError: cannot concatenate 'str' and 'list' objects

Fix by initializing series.notes as a one-element array
rather than a scalar.

Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
tools/patman/series.py

index 3399f2c8ddc34b7e81b7a050c0fda83538c74c14..cc6f80b2fd4e4dd917c45c5576979cbb4d2e9964 100644 (file)
@@ -69,7 +69,10 @@ class Series(dict):
 
         # Otherwise just set the value
         elif name in valid_series:
-            self[name] = value
+            if name=="notes":
+                self[name] = [value]
+            else:
+                self[name] = value
         else:
             raise ValueError("In %s: line '%s': Unknown 'Series-%s': valid "
                         "options are %s" % (commit.hash, line, name,