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:
Teemu Rytilahti 2017-03-26 03:19:44 +02:00
parent b1cc0fd3f6
commit 23e51a8686
3 changed files with 12 additions and 2 deletions

View File

@ -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]

View File

@ -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

View File

@ -1,7 +1,7 @@
from setuptools import setup
setup(name='pyHS100',
version='0.2.4',
version='0.2.4.1',
description='Interface for TPLink HS100 Smart Plugs.',
url='https://github.com/GadgetReactor/pyHS100',
author='Sean Seah (GadgetReactor)',