Max has uploaded this change for review. ( https://gerrit.osmocom.org/11948
Change subject: Re-apply changes to trap_helper.py
......................................................................
Re-apply changes to trap_helper.py
Due to changes getting out of sync, changes from
I44035323b70f04eb8f5dc12123cb708f53eba188 and
I21ff593be420a374a00073953c9254a013c43164 were overwritten by
I7b59f2dbded9074d15f2d2f40bf5a92ed02601e2 moving code to different
file. Fix this by re-applying those changes in new location.
Change-Id: I811f307ded63e7e1544243921ee07dceae81e295
---
M osmopy/trap_helper.py
1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests
refs/changes/48/11948/1
diff --git a/osmopy/trap_helper.py b/osmopy/trap_helper.py
index a3ffbff..4704564 100644
--- a/osmopy/trap_helper.py
+++ b/osmopy/trap_helper.py
@@ -43,11 +43,12 @@
"""
Parse CTRL TRAP and dispatch to appropriate handler after normalization
"""
+ self.factory.log.debug('TRAP %s' % v)
(l, r) = v.split()
loc = l.split('.')
t_type = loc[-1]
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
def ctrl_SET_REPLY(self, data, _, v):
--
To view, visit https://gerrit.osmocom.org/11948
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I811f307ded63e7e1544243921ee07dceae81e295
Gerrit-Change-Number: 11948
Gerrit-PatchSet: 1
Gerrit-Owner: Max <[email protected]>