def transact_block(request, connection):
 error = connection.send(request)
 reply = None
 if error:
  return (error, reply)
 ovs_poller = poller.Poller()
 while (not error):
  ovs_poller.immediate_wake()
  (error, reply) = connection.recv()
  if (error != errno.EAGAIN):
   break
  if (reply and (reply.id == request.id) and (reply.type in (jsonrpc.Message.T_REPLY, jsonrpc.Message.T_ERROR))):
   break
  connection.run()
  connection.wait(ovs_poller)
  connection.recv_wait(ovs_poller)
  ovs_poller.block()
  hub.sleep(0)
 return (error, reply)

def transact_block ( request , connection ) : error = connection . send ( request ) reply = None if error : return ( error , reply ) ovs_poller = poller . Poller ( ) while ( not error ) : ovs_poller . immediate_wake ( ) ( error , reply ) = connection . recv ( ) if ( error != errno . EAGAIN ) : break if ( reply and ( reply . id == request . id ) and ( reply . type in ( jsonrpc . Message . T_REPLY , jsonrpc . Message . T_ERROR ) ) ) : break connection . run ( ) connection . wait ( ovs_poller ) connection . recv_wait ( ovs_poller ) ovs_poller . block ( ) hub . sleep ( 0 ) return ( error , reply )
emulate jsonrpc .