Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubes
email
Commits
b3020661cc98
Commit
819665f4
authored
Jun 26, 2015
by
David Douard
Browse files
[mboximport] replace --url option by a required endpoint argument
parent
e18d0c96528f
Changes
1
Hide whitespace changes
Inline
Side-by-side
mboximportclient.py
View file @
b3020661
...
...
@@ -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
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment