Commit 819665f4 authored by David Douard's avatar David Douard
Browse files

[mboximport] replace --url option by a required endpoint argument

parent e18d0c96528f
......@@ -131,14 +131,14 @@ def main():
parser = argparse.ArgumentParser(
description='import email into a cubicweb instance')
parser.add_argument(
'--url', metavar='url', type=str, required=True,
help='base url or name of the cubicweb instance')
'endpoint', metavar='endpoint', type=str,
help='cwclientlib endpoint of the cubicweb instance')
parser.add_argument(
'mbox', metavar='mailbox', type=argparse.FileType('r'),
nargs='+', help='mbox files to import (- for stdin)')
args = parser.parse_args()
proxy = cwproxy_for(args.url)
proxy = cwproxy_for(args.endpoint)
importer = Importer(proxy)
for f in args.mbox:
......
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