From 2ee6e4cf668a9bba77c3bb019d473f3614563838 Mon Sep 17 00:00:00 2001 From: TheSameCH Date: Thu, 5 May 2016 04:09:55 +0200 Subject: [PATCH] remove checking of stderr for insserv (#1846) stderr of insserv can also contain warnings which can be ignored. checking rc only is more accurate. fixes #1502 --- system/service.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/service.py b/system/service.py index b0e39993a9f..ff5692c5317 100644 --- a/system/service.py +++ b/system/service.py @@ -826,12 +826,12 @@ class LinuxService(Service): if self.enable: (rc, out, err) = self.execute_command("%s %s" % (self.enable_cmd, self.name)) - if (rc != 0) or (err != ''): + if (rc != 0): self.module.fail_json(msg=("Failed to install service. rc: %s, out: %s, err: %s" % (rc, out, err))) return (rc, out, err) else: (rc, out, err) = self.execute_command("%s -r %s" % (self.enable_cmd, self.name)) - if (rc != 0) or (err != ''): + if (rc != 0): self.module.fail_json(msg=("Failed to remove service. rc: %s, out: %s, err: %s" % (rc, out, err))) return (rc, out, err)