ctrl2cgi: explicitly ignore arguments to lambda function
Make sure that we don't fail regardless of number of arguments given. Change-Id: I44035323b70f04eb8f5dc12123cb708f53eba188
This commit is contained in:
parent
f2199446b4
commit
9fa695d714
|
@ -108,7 +108,7 @@ class Trap(CTRL):
|
||||||
loc = l.split('.')
|
loc = l.split('.')
|
||||||
t_type = loc[-1]
|
t_type = loc[-1]
|
||||||
p = partial(lambda a, i: a[i] if len(a) > i else None, loc) # parse helper
|
p = partial(lambda a, i: a[i] if len(a) > i else None, loc) # parse helper
|
||||||
method = getattr(self, 'handle_' + t_type.replace('-', ''), lambda: "Unhandled %s trap" % t_type)
|
method = getattr(self, 'handle_' + t_type.replace('-', ''), lambda *_: "Unhandled %s trap" % t_type)
|
||||||
method(p(1), p(3), p(5), p(7), r) # we expect net.0.bsc.666.bts.2.trx.1 format for trap prefix
|
method(p(1), p(3), p(5), p(7), r) # we expect net.0.bsc.666.bts.2.trx.1 format for trap prefix
|
||||||
|
|
||||||
def ctrl_SET_REPLY(self, data, _, v):
|
def ctrl_SET_REPLY(self, data, _, v):
|
||||||
|
|
Loading…
Reference in New Issue