From f065db742d741a8bb97a7d4f3c73ce7fc8900864 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Thu, 24 Aug 2023 22:19:52 +0200 Subject: [PATCH] use isinstance instead of type comparison --- prometheuspvesd/discovery.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prometheuspvesd/discovery.py b/prometheuspvesd/discovery.py index bf1f192..ba9773f 100644 --- a/prometheuspvesd/discovery.py +++ b/prometheuspvesd/discovery.py @@ -64,7 +64,7 @@ class Discovery: except Exception: # noqa pass - if type(networks) is list: + if isinstance(networks, list): for network in networks: for ip_address in network.get("ip-addresses", []): if ip_address["ip-address-type"] == "ipv4" and not ipv4_address: