path: root/email-print-mime-structure
diff options
authorDaniel Kahn Gillmor <>2019-11-10 11:47:36 -0500
committerSean Whitton <>2019-11-15 14:31:12 -0700
commitb9a31898cfe7fd448754a98fdaa8b4145509150d (patch)
tree02dcddc772251f2f0f9498e34a6cc0b7308db4a4 /email-print-mime-structure
parent8ef023c49c264bb77f2d1a64a0ba3c0630407de7 (diff)
email-print-mime-structure: change --use-gpg-agent to a simple flag
Turns out that type=bool doesn't really do what we want it to do (see, and there is no built-in easy answer for argparse to accept a boolean value sensibly (e.g. type='bool', which might be able to handle "yes" and "no" and "1" and "0" and "on" and "off" as well as "true" and "false", etc) So rather than implement all of that here, we'll just have --use-gpg-agent as a simple flag. This is an API change, but the previous API has only been out for a few days, and the tool is documented for interactive use. Signed-off-by: Daniel Kahn Gillmor <>
Diffstat (limited to 'email-print-mime-structure')
1 files changed, 2 insertions, 2 deletions
diff --git a/email-print-mime-structure b/email-print-mime-structure
index aac8194..3f29fb9 100755
--- a/email-print-mime-structure
+++ b/email-print-mime-structure
@@ -155,9 +155,9 @@ def main() -> None:
epilog="Example: email-print-mime-structure <message.eml")
parser.add_argument('--pgpkey', metavar='KEYFILE', action='append',
help='OpenPGP Transferable Secret Key for decrypting')
- parser.add_argument('--use-gpg-agent', metavar='true|false', type=bool,
- default=False,
+ parser.add_argument('--use-gpg-agent', action='store_true',
help='Ask local GnuPG installation for decryption')
+ parser.set_defaults(use_gpg_agent=False)
if argcomplete: