def custom_callback(__kvlang__, idmap, *largs, **kwargs): idmap['args'] = largs try: exec __kvlang__.co_value in idmap except: exc_info = sys.exc_info() traceback = make_traceback(exc_info) exc_type, exc_value, tb = traceback.standard_exc_info raise exc_type, exc_value, tb
def custom_callback(*largs, **kwargs): element, key, value, idmap = largs[0] __kvlang__ = value locals().update(idmap) args = largs[1:] try: exec value[1] except: exc_info = sys.exc_info() traceback = make_traceback(exc_info) exc_type, exc_value, tb = traceback.standard_exc_info raise exc_type, exc_value, tb