mirror of
https://github.com/home-assistant/core.git
synced 2025-06-25 01:21:51 +02:00
Upgrade python-digitalocean to 1.13.2 (#11311)
This commit is contained in:
committed by
Pascal Vizeli
parent
e91d47db96
commit
7826b9aa72
@ -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
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user