Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions wsdiscovery/cmdline.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@

DEFAULT_LOGLEVEL = "INFO"

CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help'])


@contextmanager
def discovery(capture=None, unicast_num=UNICAST_UDP_REPEAT,
multicast_num=MULTICAST_UDP_REPEAT):
Expand Down Expand Up @@ -40,7 +43,7 @@ def setup_logger(name, loglevel):
return logging.getLogger(name)


@click.command()
@click.command(context_settings=CONTEXT_SETTINGS)
@click.option('--scope', '-s', help='Full scope URI, eg. onvif://www.onvif.org/Model/')
@click.option('--address', '-a', help='Service address')
@click.option('--port', '-p', type=int, help='Service port')
Expand Down Expand Up @@ -71,7 +74,7 @@ def discover(scope, address, port, loglevel, capture, timeout, unicast_num,
print(" - %s\n" % "\n - ".join([str(s) for s in service.getScopes()]))


@click.command()
@click.command(context_settings=CONTEXT_SETTINGS)
@click.option('--scope', '-s', help='Full scope URI, eg. onvif://www.onvif.org/Model/')
@click.option('--typename', '-t', help='Qualified type name, eg. https://myservicesns:myservice_type')
@click.option('--address', '-a', help='Service IP address')
Expand Down
Loading