aboutsummaryrefslogtreecommitdiff
path: root/b4/mbox.py
diff options
context:
space:
mode:
Diffstat (limited to 'b4/mbox.py')
-rw-r--r--b4/mbox.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/b4/mbox.py b/b4/mbox.py
index c2e6319..4ac2c29 100644
--- a/b4/mbox.py
+++ b/b4/mbox.py
@@ -656,12 +656,9 @@ def get_msgs(cmdargs) -> Tuple[Optional[str], Optional[list]]:
sys.exit(1)
pickings = set()
- try:
- if cmdargs.cherrypick == '_':
- # Just that msgid, please
- pickings = {msgid}
- except AttributeError:
- pass
+ if 'cherrypick' in cmdargs and cmdargs.cherrypick == '_':
+ # Just that msgid, please
+ pickings = {msgid}
msgs = b4.get_pi_thread_by_msgid(msgid, useproject=cmdargs.useproject, nocache=cmdargs.nocache,
onlymsgids=pickings)
if not msgs:
@@ -693,6 +690,9 @@ def get_msgs(cmdargs) -> Tuple[Optional[str], Optional[list]]:
logger.critical('Mailbox %s does not exist', cmdargs.localmbox)
sys.exit(1)
+ if msgid and 'noparent' in cmdargs and cmdargs.noparent:
+ msgs = b4.get_strict_thread(msgs, msgid, noparent=True)
+
if not msgid and msgs:
for msg in msgs:
msgid = msg.get('Message-ID', None)