From c3cef7227cc709a801f30f99e04769c036c0736d Mon Sep 17 00:00:00 2001 From: John Hollowell Date: Tue, 28 Jan 2020 16:52:59 -0500 Subject: [PATCH] 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! --- homeassistant/components/proxmoxve/__init__.py | 7 +++++++ homeassistant/components/proxmoxve/manifest.json | 2 +- requirements_all.txt | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/proxmoxve/__init__.py b/homeassistant/components/proxmoxve/__init__.py index 246dc2d48ad..58cb50ee304 100644 --- a/homeassistant/components/proxmoxve/__init__.py +++ b/homeassistant/components/proxmoxve/__init__.py @@ -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 diff --git a/homeassistant/components/proxmoxve/manifest.json b/homeassistant/components/proxmoxve/manifest.json index 4781478eabe..c61d296587c 100644 --- a/homeassistant/components/proxmoxve/manifest.json +++ b/homeassistant/components/proxmoxve/manifest.json @@ -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"] } diff --git a/requirements_all.txt b/requirements_all.txt index 3933d684778..a0c276faf45 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -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