Remove --ip which was just an alias to --host (#6)

This commit is contained in:
Teemu R 2020-01-12 20:29:19 +01:00 committed by GitHub
parent 4a25cbfff7
commit 3c68d295da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,14 +13,6 @@ pass_dev = click.make_pass_decorator(SmartDevice)
@click.group(invoke_without_command=True)
@click.option(
"--ip",
envvar="KASA_IP",
required=False,
help="The IP address of the device to connect to. This option "
"is deprecated and will be removed in the future; use --host "
"instead.",
)
@click.option(
"--host",
envvar="KASA_HOST",
@ -45,7 +37,7 @@ pass_dev = click.make_pass_decorator(SmartDevice)
@click.option("--strip", default=False, is_flag=True)
@click.version_option()
@click.pass_context
def cli(ctx, ip, host, alias, target, debug, bulb, plug, strip):
def cli(ctx, host, alias, target, debug, bulb, plug, strip):
"""A cli tool for controlling TP-Link smart home plugs.""" # noqa
if debug:
logging.basicConfig(level=logging.DEBUG)
@ -55,9 +47,6 @@ def cli(ctx, ip, host, alias, target, debug, bulb, plug, strip):
if ctx.invoked_subcommand == "discover":
return
if ip is not None and host is None:
host = ip
if alias is not None and host is None:
click.echo("Alias is given, using discovery to find host %s" % alias)
host = find_host_from_alias(alias=alias, target=target)