Skip to contentSkip to conversation

patman: fix series-notes handling for buildman

PATCH New Albert ARIBAUD 2 participants 8 messages Nov 9, 2015 – Feb 2, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 patman: fix series-notes handling for buildman

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 rathen than a scalar.

---

 tools/patman/series.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/patman/series.py +1 -1
index 3399f2c..e8aad59 100644
@@ -69,7 +69,7 @@ class Series(dict):
 
         # Otherwise just set the value
         elif name in valid_series:
-            self[name] = value
+            self[name] = [value]
         else:
             raise ValueError("In %s: line '%s': Unknown 'Series-%s': valid "
                         "options are %s" % (commit.hash, line, name,
Signature · 1 line
2.5.0
#1 lore raw

PATCH 1/1 patman: fix series-notes handling for buildman

Quoted 6 lines · Albert ARIBAUD

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

Quoted 8 lines

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

---

 tools/patman/series.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
#2 lore raw

PATCH 1/1 patman: fix series-notes handling for buildman

Hello Simon,

Quoted 10 lines · Simon Glass
Quoted 9 lines · Albert ARIBAUD

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 rathen than a scalar.

Quoted 7 lines
Quoted 5 lines

---

 tools/patman/series.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Note: just spotted a typo, 'rathen' instead of 'rather'. If this patch gets applied, please fix that on-the-fly.

Amicalement,

Signature · 1 line
Albert.
#3 lore raw

PATCH 1/1 patman: fix series-notes handling for buildman

Quoted 19 lines · Albert ARIBAUD

Hello Simon,

Quoted 16 lines · Simon Glass
Quoted 14 lines · Albert ARIBAUD

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 rathen than a scalar.

---

 tools/patman/series.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 8 lines
Quoted 1 line

Note: just spotted a typo, 'rathen' instead of 'rather'. If this patch gets applied, please fix that on-the-fly.

Amicalement,
--
Albert.

Fixed typo and

Applied to u-boot-dm, thanks!

#4 lore raw

PATCH 1/1 patman: fix series-notes handling for buildman

Hi Albert,

Quoted 25 lines · Simon Glass
Quoted 24 lines · Albert ARIBAUD

Hello Simon,

Quoted 10 lines · Simon Glass
Quoted 9 lines · Albert ARIBAUD

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 rathen than a scalar.

Quoted 7 lines
Quoted 5 lines

---

 tools/patman/series.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Note: just spotted a typo, 'rathen' instead of 'rather'. If this patch gets applied, please fix that on-the-fly.

Quoted 7 lines
Quoted 3 lines

Amicalement,
--
Albert.

Fixed typo and

Applied to u-boot-dm, thanks!

Hmm, actually I've had to drop this as it breaks 'Series-version'. That currently does not expect a list.

I wonder if Series-notes needs a special case, instead?

Regards,
Simon

#5 lore raw

PATCH 1/1 patman: fix series-notes handling for buildman

Hello Simon,

Quoted 32 lines · Simon Glass

Hi Albert,

Quoted 29 lines · Simon Glass
Quoted 27 lines · Albert ARIBAUD

Hello Simon,

Quoted 10 lines · Simon Glass
Quoted 9 lines · Albert ARIBAUD

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 rathen than a scalar.

Quoted 7 lines
Quoted 5 lines

---

 tools/patman/series.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Note: just spotted a typo, 'rathen' instead of 'rather'. If this patch gets applied, please fix that on-the-fly.

Amicalement,
--
Albert.

Quoted 6 lines
Quoted 3 lines

Fixed typo and

Applied to u-boot-dm, thanks!

Hmm, actually I've had to drop this as it breaks 'Series-version'. That currently does not expect a list.

Hmm, I can't reproduce this here. How do you trigger the Series-version break?

Quoted 4 lines

I wonder if Series-notes needs a special case, instead?

Regards,
Simon

Amicalement,

Signature · 1 line
Albert.
#6 lore raw

PATCH 1/1 patman: fix series-notes handling for buildman

Hi Albert,

Quoted 38 lines · Albert ARIBAUD

Hello Simon,

Quoted 34 lines · Simon Glass

Hi Albert,

Quoted 31 lines · Simon Glass
Quoted 19 lines · Albert ARIBAUD

Hello Simon,

Quoted 16 lines · Simon Glass
Quoted 14 lines · Albert ARIBAUD

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 rathen than a scalar.

---

 tools/patman/series.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 8 lines
Quoted 1 line

Note: just spotted a typo, 'rathen' instead of 'rather'. If this patch gets applied, please fix that on-the-fly.

Amicalement,
--
Albert.

Fixed typo and

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Applied to u-boot-dm, thanks!

Hmm, actually I've had to drop this as it breaks 'Series-version'. That currently does not expect a list.

Hmm, I can't reproduce this here. How do you trigger the Series-version break?

I created a commit with a Series-version: in it. Then, running patman gives a run-time error because it is expecting a single value, not an array.

Quoted 9 lines
Quoted 5 lines

I wonder if Series-notes needs a special case, instead?

Regards,
Simon

Amicalement,
--
Albert.

Regards,
Simon

#7 lore raw

PATCH 1/1 patman: fix series-notes handling for buildman

Hello Simon,

Quoted 9 lines
Quoted 5 lines
Quoted 2 lines

Hmm, actually I've had to drop this as it breaks 'Series-version'. That currently does not expect a list.

Hmm, I can't reproduce this here. How do you trigger the Series-version break?

I created a commit with a Series-version: in it. Then, running patman gives a run-time error because it is expecting a single value, not an array.

Thanks.

Weird. That's what I'd done when starting v2 (so that I could test my commit with itself) except I also had Series-note: in it, and it would not trigger this. Then I rolled back to v1 and did it again, and this time I get the error. And before anyone asks, I'd run git clean- xfd so there was no precompiled Python in the way.

Oh well.

v2 just sent.

Amicalement,

Signature · 1 line
Albert.