Beispiel #1
0
 def do_action(self, context, action):
     if action.type == "internal":
         raise flight.FlightInternalError("foo")
     elif action.type == "timedout":
         raise flight.FlightTimedOutError("foo")
     elif action.type == "cancel":
         raise flight.FlightCancelledError("foo")
     elif action.type == "unauthenticated":
         raise flight.FlightUnauthenticatedError("foo")
     elif action.type == "unauthorized":
         raise flight.FlightUnauthorizedError("foo")
     raise NotImplementedError
Beispiel #2
0
 def do_action(self, context, action):
     if action.type == "internal":
         raise flight.FlightInternalError("foo")
     elif action.type == "timedout":
         raise flight.FlightTimedOutError("foo")
     elif action.type == "cancel":
         raise flight.FlightCancelledError("foo")
     elif action.type == "unauthenticated":
         raise flight.FlightUnauthenticatedError("foo")
     elif action.type == "unauthorized":
         raise flight.FlightUnauthorizedError("foo")
     elif action.type == "protobuf":
         err_msg = b'this is an error message'
         raise flight.FlightUnauthorizedError("foo", err_msg)
     raise NotImplementedError
Beispiel #3
0
 def do_put(self, context, descriptor, reader, writer):
     time.sleep(1)
     raise flight.FlightCancelledError("")