From ca01e98cb87c6dd18f9ccede1e42495d85558236 Mon Sep 17 00:00:00 2001 From: paulfantom Date: Thu, 14 Jul 2016 00:39:46 +0200 Subject: [PATCH] fix postfix (no mails error) --- plugins.d/python.d.plugin | 1 + python.d/python_modules/base.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/plugins.d/python.d.plugin b/plugins.d/python.d.plugin index f5738e6e..bddcd6e5 100755 --- a/plugins.d/python.d.plugin +++ b/plugins.d/python.d.plugin @@ -484,6 +484,7 @@ def run(): # parse passed command line arguments modules = parse_cmdline(MODULES_DIR, *sys.argv) msg.DEBUG_FLAG = DEBUG_FLAG + modules = ['postfix'] msg.info("MODULES_DIR='" + MODULES_DIR + "', CONFIG_DIR='" + CONFIG_DIR + "', UPDATE_EVERY=" + str(BASE_CONFIG['update_every']) + diff --git a/python.d/python_modules/base.py b/python.d/python_modules/base.py index 077b6129..93467386 100644 --- a/python.d/python_modules/base.py +++ b/python.d/python_modules/base.py @@ -642,6 +642,9 @@ class ExecutableService(SimpleService): for line in p.stdout.readlines(): data.append(str(line.decode())) + if len(data) == 0: + return None + return data def check(self): -- 2.39.2