mirror of
https://github.com/python-kasa/python-kasa.git
synced 2024-12-22 19:23:34 +00:00
cli: display an error if no ip is given
also bump the version to 0.2.4.1 with this fix.
This commit is contained in:
parent
b1cc0fd3f6
commit
23e51a8686
@ -1,7 +1,12 @@
|
||||
Changelog
|
||||
=========
|
||||
|
||||
0.2.4 (2017-03-20)
|
||||
0.2.4.1 (2017-03-26)
|
||||
------------
|
||||
- Cli: display an error if no ip is given. [Teemu Rytilahti]
|
||||
|
||||
|
||||
0.2.4 (2017-03-26)
|
||||
------------------
|
||||
|
||||
- Add new client tool (#42) [Teemu R]
|
||||
|
@ -1,3 +1,4 @@
|
||||
import sys
|
||||
import click
|
||||
import logging
|
||||
from click_datetime import Datetime
|
||||
@ -22,6 +23,10 @@ def cli(ctx, ip, debug):
|
||||
if ctx.invoked_subcommand == "discover":
|
||||
return
|
||||
|
||||
if ip is None:
|
||||
click.echo("You must specify the IP either by --ip or setting PYHS100_IP environment variable!")
|
||||
sys.exit(-1)
|
||||
|
||||
plug = SmartPlug(ip)
|
||||
ctx.obj = plug
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user