From a3aa1e87a0fa2505e5145f6d8308ef8e48b0d56e Mon Sep 17 00:00:00 2001 From: Hanne Moa Date: Wed, 11 Jan 2023 10:44:57 +0100 Subject: [PATCH] Paint it black --- contrib/scripts/isc_dhpcd_graphite/isc_dhpcd_graphite.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/contrib/scripts/isc_dhpcd_graphite/isc_dhpcd_graphite.py b/contrib/scripts/isc_dhpcd_graphite/isc_dhpcd_graphite.py index e9edb5e6f2..1f49e3010a 100644 --- a/contrib/scripts/isc_dhpcd_graphite/isc_dhpcd_graphite.py +++ b/contrib/scripts/isc_dhpcd_graphite/isc_dhpcd_graphite.py @@ -36,7 +36,7 @@ "touched": "touch", "free": "free", } -VERSION="0.2" +VERSION = "0.2" Metric = namedtuple("Metric", ["path", "value", "timestamp"]) @@ -138,8 +138,10 @@ def parse_args(): def get_config_from_args(args): config = None if getattr(args, "extract_vlan", False): + class Config: pass + config = Config() config.extract_vlan = True return config @@ -172,7 +174,7 @@ def _render_text(jsonblob, prefix, config=None): return "".join(output).encode("ascii") -def _render_pickle(jsonblob, prefix, protocol,config=None): +def _render_pickle(jsonblob, prefix, protocol, config=None): input = _tuplify(jsonblob, prefix, config) output = [] for metric in input: