summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--b4/__init__.py2
-rw-r--r--b4/mbox.py9
2 files changed, 9 insertions, 2 deletions
diff --git a/b4/__init__.py b/b4/__init__.py
index 5c59150..07f2aad 100644
--- a/b4/__init__.py
+++ b/b4/__init__.py
@@ -2206,7 +2206,7 @@ def save_strict_thread(in_mbx, out_mbx, msgid):
return None
if len(in_mbx) > len(out_mbx):
- logger.info('Reduced thread to strict matches only (%s->%s)', len(in_mbx), len(out_mbx))
+ logger.debug('Reduced mbox to strict matches only (%s->%s)', len(in_mbx), len(out_mbx))
def get_pi_thread_by_url(t_mbx_url, savefile, nocache=False):
diff --git a/b4/mbox.py b/b4/mbox.py
index f34b887..e9a2ab2 100644
--- a/b4/mbox.py
+++ b/b4/mbox.py
@@ -511,7 +511,14 @@ def main(cmdargs):
return
else:
if os.path.exists(cmdargs.localmbox):
- threadmbox = cmdargs.localmbox
+ msgid = b4.get_msgid(cmdargs)
+ if os.path.isdir(cmdargs.localmbox):
+ in_mbx = mailbox.Maildir(cmdargs.localmbox)
+ else:
+ in_mbx = mailbox.mbox(cmdargs.localmbox)
+ out_mbx = mailbox.mbox(savefile)
+ b4.save_strict_thread(in_mbx, out_mbx, msgid)
+ threadmbox = savefile
else:
logger.critical('Mailbox %s does not exist', cmdargs.localmbox)
os.unlink(savefile)