Commit 9e37c553 authored by David Douard's avatar David Douard
Browse files

[mboximport] (re)add a --skipsign cmdline option (closes #9360016)

been lost in cw->cwclientlib translation
parent 340b6f710548
......@@ -31,10 +31,11 @@ class StreamMailbox(mailbox.mbox):
class Importer(object):
def __init__(self, proxy):
def __init__(self, proxy, skipsign=False):
self.proxy = proxy
self._address_cache = {}
self._reqs = []
self._skipsign = skipsign
def import_mbox_stream(self, stream):
self._import(StreamMailbox(stream, message_from_file, create=False))
......@@ -136,11 +137,15 @@ def main():
parser.add_argument(
'mbox', metavar='mailbox', type=argparse.FileType('rb'),
nargs='+', help='mbox files to import (- for stdin)')
parser.add_argument(
'-S', '--skipsign', action='store_true',
default=False,
help='do not create EmailPart for PGP/GPG signatures')
args = parser.parse_args()
proxy = cwproxy_for(args.endpoint)
importer = Importer(proxy)
importer = Importer(proxy, skipsign=args.skipsign)
for f in args.mbox:
try:
f.seek(0)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment