aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>2021-06-09 11:28:54 -0400
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2021-06-09 11:28:54 -0400
commitc878da206452b3839c3fd180633d2d20be69e58f (patch)
treec302e7aa8f071548bc09caa2162abd5f3158bb3a
parenta06304fcd63facb5e6fea86c8ff8ad42430c4439 (diff)
downloadb4-c878da206452b3839c3fd180633d2d20be69e58f.tar.gz
Fix for recent function API changes
Returning a simple list of messages from get_am_ready broke a few other auxiliary functions invoked when run with -o- or -Q. Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
-rw-r--r--b4/mbox.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/b4/mbox.py b/b4/mbox.py
index c0ada06..eeccaf2 100644
--- a/b4/mbox.py
+++ b/b4/mbox.py
@@ -130,7 +130,7 @@ def make_am(msgs, cmdargs, msgid):
else:
am_filename = None
am_cover = None
- b4.save_git_am_mbox([x[1] for x in am_msgs], sys.stdout.buffer)
+ b4.save_git_am_mbox(am_msgs, sys.stdout.buffer)
logger.info('---')
@@ -341,7 +341,9 @@ def save_as_quilt(am_msgs, q_dirname):
return
pathlib.Path(q_dirname).mkdir(parents=True)
patch_filenames = list()
- for slug, msg in am_msgs:
+ for msg in am_msgs:
+ lsubj = b4.LoreSubject(msg.get('subject', ''))
+ slug = '%04d_%s' % (lsubj.counter, re.sub(r'\W+', '_', lsubj.subject).strip('_').lower())
patch_filename = f'{slug}.patch'
patch_filenames.append(patch_filename)
quilt_out = os.path.join(q_dirname, patch_filename)