From: Jason Ish Date: Mon, 4 Dec 2017 22:15:01 +0000 (-0600) Subject: add-source: don't use flags for options X-Git-Tag: 1.0.0a1~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=99dbf8119aa9908cb6121d2e4d0f0f9495600ad7;p=thirdparty%2Fsuricata-update.git add-source: don't use flags for options Instead making name and url positional args. We can add a flag to change the meaning of the URL later. --- diff --git a/doc/add-source.rst b/doc/add-source.rst index 77677da..0974731 100644 --- a/doc/add-source.rst +++ b/doc/add-source.rst @@ -7,7 +7,7 @@ Synopsis :: - suricata-update add-source [--name name] [--url ] + suricata-update add-source Description =========== @@ -18,14 +18,4 @@ URL. It is useful to add a source that is not provided in the index. Options ======= -.. option:: --name - - The name of the source. If not provided on the command line the - user will be prompted. - -.. option:: --url - - The URL of the source. If not provided on the command line the user - will be prompted. - .. include:: ./common-options.rst diff --git a/suricata/update/commands/addsource.py b/suricata/update/commands/addsource.py index cdff4d1..e53db37 100644 --- a/suricata/update/commands/addsource.py +++ b/suricata/update/commands/addsource.py @@ -23,8 +23,8 @@ from suricata.update import sources logger = logging.getLogger() def register(parser): - parser.add_argument("--name", metavar="", help="Name of source") - parser.add_argument("--url", metavar="", help="Source URL") + parser.add_argument("name", metavar="", help="Name of source") + parser.add_argument("url", metavar="", help="Source URL") parser.set_defaults(func=add_source) def add_source(config):