Skip to content

Commit

Permalink
Raise exception when setup fails
Browse files Browse the repository at this point in the history
  • Loading branch information
w1ll1am23 committed Jul 19, 2018
1 parent b91adbc commit 88bd2d9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Change Log

## 2.0.2
- Raise exception when setup doesn't complete

## 2.0.1
- Allow users without monthly monitoring to get system status

Expand Down
2 changes: 1 addition & 1 deletion src/setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from setuptools import setup, find_packages

setup(name='simplisafe-python',
version='2.0.1',
version='2.0.2',
description='Python 3 support for SimpliSafe alarm',
url='https://github.com/w1ll1am23/simplisafe-python',
author='William Scanlon',
Expand Down
4 changes: 4 additions & 0 deletions src/simplipy/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ def __init__(self, username, password, basic_auth=None):
_LOGGER.info("Setup complete")
else:
_LOGGER.error("Failed to complete setup")
raise SimpliSafeAPIException("Failed to complete setup")

def _get_token(self):
"""
Expand Down Expand Up @@ -290,3 +291,6 @@ def get_systems(self):
_LOGGER.error("Empty system state")

return systems

class SimpliSafeAPIException(Exception):
pass

0 comments on commit 88bd2d9

Please sign in to comment.