Upgrade python-digitalocean to 1.13.2 (#11311)

This commit is contained in:
Fabian Affolter 2017-12-27 09:20:44 +01:00 committed by Pascal Vizeli
parent e91d47db96
commit 7826b9aa72
2 changed files with 10 additions and 4 deletions

View file

@ -13,7 +13,7 @@ from homeassistant.const import CONF_ACCESS_TOKEN
from homeassistant.util import Throttle
import homeassistant.helpers.config_validation as cv
REQUIREMENTS = ['python-digitalocean==1.12']
REQUIREMENTS = ['python-digitalocean==1.13.2']
_LOGGER = logging.getLogger(__name__)
@ -44,13 +44,19 @@ CONFIG_SCHEMA = vol.Schema({
def setup(hass, config):
"""Set up the Digital Ocean component."""
import digitalocean
conf = config[DOMAIN]
access_token = conf.get(CONF_ACCESS_TOKEN)
digital = DigitalOcean(access_token)
if not digital.manager.get_account():
_LOGGER.error("No Digital Ocean account found for the given API Token")
try:
if not digital.manager.get_account():
_LOGGER.error("No account found for the given API token")
return False
except digitalocean.baseapi.DataReadError:
_LOGGER.error("API token not valid for authentication")
return False
hass.data[DATA_DIGITAL_OCEAN] = digital

View file

@ -836,7 +836,7 @@ python-blockchain-api==0.0.2
python-clementine-remote==1.0.1
# homeassistant.components.digital_ocean
python-digitalocean==1.12
python-digitalocean==1.13.2
# homeassistant.components.ecobee
python-ecobee-api==0.0.14