Module: check_mk
Branch: master
Commit: 4c93b5710912a4373d96e6b2e10cbf71defb919e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4c93b5710912a4…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Wed Jul 26 12:37:37 2017 +0200
Do not use tuple parameter unpacking.
It's on death row already and doesn't buy us anything, see
https://www.python.org/dev/peps/pep-3113/
Change-Id: I5a607a6f948432a0ec7f8b4dd845c06a4f917809
---
bin/mkeventd | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/bin/mkeventd b/bin/mkeventd
index bf6ef11..20ecee0 100755
--- a/bin/mkeventd
+++ b/bin/mkeventd
@@ -1590,7 +1590,8 @@ class EventServer(object):
# Receives an incoming SNMP trap from the socket and hands it over to PySNMP for
parsing
# and processing. PySNMP is calling self.handle_snmptrap back.
- def process_snmptrap(self, (whole_msg, sender_address)):
+ def process_snmptrap(self, data):
+ whole_msg, sender_address = data
self.logger.verbose("Trap received from %s:%d. Checking for acceptance
now." % sender_address)
g_snmp_engine.setUserContext(sender_address=sender_address)
g_snmp_engine.msgAndPduDsp.receiveMessage(g_snmp_engine, (), (), whole_msg)
@@ -2235,7 +2236,8 @@ class EventServer(object):
syslog_facilities[facility], syslog_priorities[priority], count,
(100.0 * count / float(total_count))))
- def process_line(self, (line, address)):
+ def process_line(self, data):
+ line, address = data
line = line.rstrip()
if g_config["debug_rules"]:
if address: