Add proxmoxve SSLError check and remove log spam (#30818)

* Add SSLError check and remove log spam

* Update homeassistant/components/proxmoxve/manifest.json

remove unnecessary requirement

* Remove log level change

Moved to proxmoxer library

* Update homeassistant/components/proxmoxve/__init__.py

* Update manifest.json

Update to new version of dependency which fixes log issue

* Run formatter and requires updates

* oops, tabs

* Fix quote marks

When you can't get black running, just fix whatever CI says is wrong!
This commit is contained in:
John Hollowell 2020-01-28 16:52:59 -05:00 committed by Martin Hjelmare
parent 8ceef72853
commit c3cef7227c
3 changed files with 9 additions and 2 deletions

View File

@ -5,6 +5,7 @@ import time
from proxmoxer import ProxmoxAPI
from proxmoxer.backends.https import AuthenticationError
from requests.exceptions import SSLError
import voluptuous as vol
from homeassistant.const import (
@ -18,6 +19,7 @@ import homeassistant.helpers.config_validation as cv
_LOGGER = logging.getLogger(__name__)
DOMAIN = "proxmoxve"
PROXMOX_CLIENTS = "proxmox_clients"
CONF_REALM = "realm"
@ -94,6 +96,11 @@ def setup(hass, config):
"Invalid credentials for proxmox instance %s:%d", host, port
)
continue
except SSLError:
_LOGGER.error(
'Unable to verify proxmox server SSL. Try using "verify_ssl: false"'
)
continue
hass.data[PROXMOX_CLIENTS][f"{host}:{port}"] = proxmox_client

View File

@ -4,5 +4,5 @@
"documentation": "https://www.home-assistant.io/integrations/proxmoxve",
"dependencies": [],
"codeowners": ["@k4ds3"],
"requirements": ["proxmoxer==1.0.3"]
"requirements": ["proxmoxer==1.0.4"]
}

View File

@ -1043,7 +1043,7 @@ prometheus_client==0.7.1
protobuf==3.6.1
# homeassistant.components.proxmoxve
proxmoxer==1.0.3
proxmoxer==1.0.4
# homeassistant.components.systemmonitor
psutil==5.6.7