def _error_to_jsondict(mod, type_, code):
 (t_name, c_name) = _get_error_names(mod, type_, code)
 return {'type': ('%s(%d)' % (t_name, type_)), 'code': ('%s(%d)' % (c_name, code))}

def _error_to_jsondict ( mod , type_ , code ) : ( t_name , c_name ) = _get_error_names ( mod , type_ , code ) return { 'type' : ( '%s(%d)' % ( t_name , type_ ) ) , 'code' : ( '%s(%d)' % ( c_name , code ) ) }
this method is registered as ofp_error_to_jsondict method into ryu .