From 168065b9bc79e6ad7b7028a91a90828b02d70fec Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Tue, 12 Dec 2017 21:12:41 -0800 Subject: [PATCH] Update Warrant (#11101) * Update Warrant * Lint --- homeassistant/components/cloud/__init__.py | 2 +- homeassistant/components/cloud/auth_api.py | 7 +++++-- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/cloud/__init__.py b/homeassistant/components/cloud/__init__.py index 9bd91d22beb..2844b0c88f3 100644 --- a/homeassistant/components/cloud/__init__.py +++ b/homeassistant/components/cloud/__init__.py @@ -16,7 +16,7 @@ from homeassistant.components.alexa import smart_home from . import http_api, iot from .const import CONFIG_DIR, DOMAIN, SERVERS -REQUIREMENTS = ['warrant==0.5.0'] +REQUIREMENTS = ['warrant==0.6.1'] _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/cloud/auth_api.py b/homeassistant/components/cloud/auth_api.py index 95bf5596835..9cad3ec77f3 100644 --- a/homeassistant/components/cloud/auth_api.py +++ b/homeassistant/components/cloud/auth_api.py @@ -68,11 +68,14 @@ def register(cloud, email, password): from botocore.exceptions import ClientError cognito = _cognito(cloud) + # Workaround for bug in Warrant. PR with fix: + # https://github.com/capless/warrant/pull/82 + cognito.add_base_attributes() try: if cloud.cognito_email_based: - cognito.register(email, password, email=email) + cognito.register(email, password) else: - cognito.register(_generate_username(email), password, email=email) + cognito.register(_generate_username(email), password) except ClientError as err: raise _map_aws_exception(err) diff --git a/requirements_all.txt b/requirements_all.txt index 8f40709d187..d21b58bc82a 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1149,7 +1149,7 @@ wakeonlan==0.2.2 waqiasync==1.0.0 # homeassistant.components.cloud -warrant==0.5.0 +warrant==0.6.1 # homeassistant.components.media_player.gpmdp websocket-client==0.37.0 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 6e1b617ef66..363f561de0d 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -182,7 +182,7 @@ vultr==0.1.2 wakeonlan==0.2.2 # homeassistant.components.cloud -warrant==0.5.0 +warrant==0.6.1 # homeassistant.components.sensor.yahoo_finance yahoo-finance==1.4.0