mirror of
https://github.com/thegeeklab/prometheus-pve-sd.git
synced 2024-06-01 15:39:39 +02:00
fix linting
This commit is contained in:
parent
49217035c2
commit
47f1a026ea
|
@ -207,7 +207,7 @@ class Config():
|
||||||
else:
|
else:
|
||||||
raise prometheuspvesd.exception.ConfigError(
|
raise prometheuspvesd.exception.ConfigError(
|
||||||
"Unable to read environment variable", str(e)
|
"Unable to read environment variable", str(e)
|
||||||
)
|
) from e
|
||||||
|
|
||||||
return normalized
|
return normalized
|
||||||
|
|
||||||
|
|
|
@ -61,8 +61,8 @@ class Discovery():
|
||||||
try:
|
try:
|
||||||
if self.client.get_agent_info(pve_node, pve_type, vmid) is not None:
|
if self.client.get_agent_info(pve_node, pve_type, vmid) is not None:
|
||||||
networks = self.client.get_network_interfaces(pve_node, vmid)
|
networks = self.client.get_network_interfaces(pve_node, vmid)
|
||||||
except Exception: # noqa # nosec
|
except Exception: # noqa
|
||||||
pass # noqa
|
pass
|
||||||
|
|
||||||
if type(networks) is list:
|
if type(networks) is list:
|
||||||
for network in networks:
|
for network in networks:
|
||||||
|
@ -85,8 +85,8 @@ class Discovery():
|
||||||
if find and find.group(1):
|
if find and find.group(1):
|
||||||
ipv4_address = find.group(1)
|
ipv4_address = find.group(1)
|
||||||
break
|
break
|
||||||
except Exception: # noqa # nosec
|
except Exception: # noqa
|
||||||
pass # noqa
|
pass
|
||||||
|
|
||||||
if config and not ipv6_address:
|
if config and not ipv6_address:
|
||||||
try:
|
try:
|
||||||
|
@ -102,8 +102,8 @@ class Discovery():
|
||||||
if find and find.group(1):
|
if find and find.group(1):
|
||||||
ipv6_address = find.group(1)
|
ipv6_address = find.group(1)
|
||||||
break
|
break
|
||||||
except Exception: # noqa # nosec
|
except Exception: # noqa
|
||||||
pass # noqa
|
pass
|
||||||
|
|
||||||
return ipv4_address, ipv6_address
|
return ipv4_address, ipv6_address
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user