Skip to content

Commit

Permalink
Merge pull request #54 from NabuCasa/dev
Browse files Browse the repository at this point in the history
Release 0.12
  • Loading branch information
pvizeli authored Apr 17, 2019
2 parents afbdfd7 + fa0507f commit 0fb99f6
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
7 changes: 6 additions & 1 deletion hass_nabucasa/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ class UserNotFound(CloudError):
"""Raised when a user is not found."""


class UserExists(CloudError):
"""Raised when a username already exists."""


class UserNotConfirmed(CloudError):
"""Raised when a user has not confirmed email yet."""

Expand All @@ -44,8 +48,9 @@ class UnknownError(CloudError):

AWS_EXCEPTIONS = {
"UserNotFoundException": UserNotFound,
"NotAuthorizedException": Unauthenticated,
"UserNotConfirmedException": UserNotConfirmed,
"UsernameExistsException": UserExists,
"NotAuthorizedException": Unauthenticated,
"PasswordResetRequiredException": PasswordChangeRequired,
}

Expand Down
2 changes: 1 addition & 1 deletion hass_nabucasa/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"""

MESSAGE_REMOTE_READY = """
You remote access is now available.
Your remote access is now available.
You can manage your connectivity on the [Cloud Panel](/config/cloud) or with our [Portal](https://remote.nabucasa.com/).
"""

Expand Down
4 changes: 3 additions & 1 deletion hass_nabucasa/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,11 @@ async def connect(self) -> None:
_LOGGER.error("Connection problem to snitun server")
except RemoteBackendError:
_LOGGER.error("Can't refresh the snitun token")
except AttributeError:
pass # Ignore because HA shutdown on snitun token refresh
finally:
# start retry task
if not self._reconnect_task:
if self._snitun and not self._reconnect_task:
self._reconnect_task = self.cloud.run_task(self._reconnect_snitun())

async def disconnect(self) -> None:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from setuptools import setup

VERSION = "0.11"
VERSION = "0.12"

setup(
name="hass-nabucasa",
Expand Down

0 comments on commit 0fb99f6

Please sign in to comment.