Skip to content

Commit 6d58281

Browse files
committed
Only -q when log_output is none
1 parent c3116c2 commit 6d58281

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

LibreNMS/queuemanager.py

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -535,11 +535,13 @@ def do_work(self, device_id, group):
535535
else self.config.log_output
536536
)
537537

538-
args = (
539-
("device:poll", device_id, "-vv")
540-
if self.config.debug
541-
else ("device:poll", device_id, "-q")
542-
)
538+
args_list = ["device:poll", device_id]
539+
if self.config.debug:
540+
args_list.append("-vv")
541+
elif self.config.log_output is LogOutput.NONE:
542+
args_list.append("-q")
543+
args = tuple(args_list)
544+
543545
exit_code, output = LibreNMS.call_script("lnms", args, output)
544546

545547
if exit_code == 0:
@@ -603,11 +605,13 @@ def do_work(self, device_id, group):
603605
else self.config.log_output
604606
)
605607

606-
args = (
607-
("device:discover", device_id, "-vv")
608-
if self.config.debug
609-
else ("device:discover", device_id, "-q")
610-
)
608+
args_list = ["device:poll", device_id]
609+
if self.config.debug:
610+
args_list.append("-vv")
611+
elif self.config.log_output is LogOutput.NONE:
612+
args_list.append("-q")
613+
args = tuple(args_list)
614+
611615
exit_code, output = LibreNMS.call_script("lnms", args, output)
612616

613617
if exit_code == 0:

0 commit comments

Comments
 (0)