From d5cb2736636c4957b2742d563e811db253273eef Mon Sep 17 00:00:00 2001 From: paulfantom Date: Tue, 14 Jun 2016 20:06:22 +0200 Subject: [PATCH] handling bad configurations --- plugins.d/python.d.plugin | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins.d/python.d.plugin b/plugins.d/python.d.plugin index 5dc4f0b0..07426dce 100755 --- a/plugins.d/python.d.plugin +++ b/plugins.d/python.d.plugin @@ -100,7 +100,10 @@ class PythonCharts(object): if os.path.isfile(configfile): debug("loading chart options: '" + configfile + "'") for k, v in read_config(configfile).items(): - setattr(m, k, v) + try: + setattr(m, k, v) + except AttributeError: + self._disable_module(m,"misbehaving having bad configuration") else: debug(m.__name__ + ": configuration file '" + -- 2.39.2