wip try test that we see INFO events from the core

This commit is contained in:
holger krekel
2019-07-15 22:51:57 +02:00
parent 3e3403d3d7
commit 9ad4c9a6fe
5 changed files with 37 additions and 3 deletions

View File

@@ -20,6 +20,7 @@ def py_dc_callback(ctx, evt, data1, data2):
CFFI only allows us to set one global event handler, so this one
looks up the correct event handler for the given context.
"""
print("py_dc_callback", evt, data1, data2, ctx)
try:
callback = _DC_CALLBACK_MAP.get(ctx, lambda *a: 0)
except AttributeError:
@@ -54,6 +55,7 @@ def py_dc_callback(ctx, evt, data1, data2):
def set_context_callback(dc_context, func):
print("set_context_callback", dc_context, func)
_DC_CALLBACK_MAP[dc_context] = func