Exemplo n.º 1
0
 def parent_action(*args, **kwargs):
     request = {"action": action, "args": args, "kwargs": kwargs}
     put_object(request)
     reply = get_object()
     if "action" in reply:
         if reply["action"] == "terminate":
             sys.exit()
         else:
             raise ValueError
     if reply["status"] == "ok":
         return reply["data"]
     else:
         raise_packed_exc(reply["exception"])
Exemplo n.º 2
0
 def parent_action(*args, **kwargs):
     request = {"action": action, "args": args, "kwargs": kwargs}
     put_object(request)
     reply = get_object()
     if "action" in reply:
         if reply["action"] == "terminate":
             sys.exit()
         else:
             raise ValueError
     if reply["status"] == "ok":
         return reply["data"]
     else:
         raise_packed_exc(reply["exception"])