diff --git a/CHANGELOG b/CHANGELOG index 1dce997b..ae77c5e1 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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] diff --git a/pyHS100/cli.py b/pyHS100/cli.py index acdcc5c2..fcaf4781 100644 --- a/pyHS100/cli.py +++ b/pyHS100/cli.py @@ -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 diff --git a/setup.py b/setup.py index eae50f26..53aa8211 100644 --- a/setup.py +++ b/setup.py @@ -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)',