mirror of
https://github.com/python-kasa/python-kasa.git
synced 2024-12-22 11:13: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
|
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]
|
- Add new client tool (#42) [Teemu R]
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import sys
|
||||||
import click
|
import click
|
||||||
import logging
|
import logging
|
||||||
from click_datetime import Datetime
|
from click_datetime import Datetime
|
||||||
@ -22,6 +23,10 @@ def cli(ctx, ip, debug):
|
|||||||
if ctx.invoked_subcommand == "discover":
|
if ctx.invoked_subcommand == "discover":
|
||||||
return
|
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)
|
plug = SmartPlug(ip)
|
||||||
ctx.obj = plug
|
ctx.obj = plug
|
||||||
|
|
||||||
|
2
setup.py
2
setup.py
@ -1,7 +1,7 @@
|
|||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
|
|
||||||
setup(name='pyHS100',
|
setup(name='pyHS100',
|
||||||
version='0.2.4',
|
version='0.2.4.1',
|
||||||
description='Interface for TPLink HS100 Smart Plugs.',
|
description='Interface for TPLink HS100 Smart Plugs.',
|
||||||
url='https://github.com/GadgetReactor/pyHS100',
|
url='https://github.com/GadgetReactor/pyHS100',
|
||||||
author='Sean Seah (GadgetReactor)',
|
author='Sean Seah (GadgetReactor)',
|
||||||
|
Loading…
Reference in New Issue
Block a user