Skip to content

Commit

Permalink
cli: display an error if no ip is given
Browse files Browse the repository at this point in the history
also bump the version to 0.2.4.1 with this fix.
  • Loading branch information
rytilahti committed Mar 26, 2017
1 parent b1cc0fd commit 23e51a8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
5 changes: 5 additions & 0 deletions pyHS100/cli.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import sys
import click
import logging
from click_datetime import Datetime
Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -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)',
Expand Down

0 comments on commit 23e51a8

Please sign in to comment.