fix linting

This commit is contained in:
Robert Kaussow 2023-02-20 10:42:01 +01:00
parent 49217035c2
commit 47f1a026ea
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0
2 changed files with 7 additions and 7 deletions

View File

@ -207,7 +207,7 @@ class Config():
else:
raise prometheuspvesd.exception.ConfigError(
"Unable to read environment variable", str(e)
)
) from e
return normalized

View File

@ -61,8 +61,8 @@ class Discovery():
try:
if self.client.get_agent_info(pve_node, pve_type, vmid) is not None:
networks = self.client.get_network_interfaces(pve_node, vmid)
except Exception: # noqa # nosec
pass # noqa
except Exception: # noqa
pass
if type(networks) is list:
for network in networks:
@ -85,8 +85,8 @@ class Discovery():
if find and find.group(1):
ipv4_address = find.group(1)
break
except Exception: # noqa # nosec
pass # noqa
except Exception: # noqa
pass
if config and not ipv6_address:
try:
@ -102,8 +102,8 @@ class Discovery():
if find and find.group(1):
ipv6_address = find.group(1)
break
except Exception: # noqa # nosec
pass # noqa
except Exception: # noqa
pass
return ipv4_address, ipv6_address