Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def translate_to_rpc(self, rpcResult):
return {
0: camera_pb2.CameraResult.UNKNOWN,
1: camera_pb2.CameraResult.SUCCESS,
2: camera_pb2.CameraResult.IN_PROGRESS,
3: camera_pb2.CameraResult.BUSY,
4: camera_pb2.CameraResult.DENIED,
5: camera_pb2.CameraResult.ERROR,
6: camera_pb2.CameraResult.TIMEOUT,
7: camera_pb2.CameraResult.WRONG_ARGUMENT
}.get(self.value, None)
def translate_to_rpc(self, rpcResult):
return {
0: camera_pb2.CameraResult.UNKNOWN,
1: camera_pb2.CameraResult.SUCCESS,
2: camera_pb2.CameraResult.IN_PROGRESS,
3: camera_pb2.CameraResult.BUSY,
4: camera_pb2.CameraResult.DENIED,
5: camera_pb2.CameraResult.ERROR,
6: camera_pb2.CameraResult.TIMEOUT,
7: camera_pb2.CameraResult.WRONG_ARGUMENT
}.get(self.value, None)
def translate_to_rpc(self, rpcResult):
return {
0: camera_pb2.CameraResult.UNKNOWN,
1: camera_pb2.CameraResult.SUCCESS,
2: camera_pb2.CameraResult.IN_PROGRESS,
3: camera_pb2.CameraResult.BUSY,
4: camera_pb2.CameraResult.DENIED,
5: camera_pb2.CameraResult.ERROR,
6: camera_pb2.CameraResult.TIMEOUT,
7: camera_pb2.CameraResult.WRONG_ARGUMENT
}.get(self.value, None)
def translate_to_rpc(self, rpcResult):
return {
0: camera_pb2.CameraResult.UNKNOWN,
1: camera_pb2.CameraResult.SUCCESS,
2: camera_pb2.CameraResult.IN_PROGRESS,
3: camera_pb2.CameraResult.BUSY,
4: camera_pb2.CameraResult.DENIED,
5: camera_pb2.CameraResult.ERROR,
6: camera_pb2.CameraResult.TIMEOUT,
7: camera_pb2.CameraResult.WRONG_ARGUMENT
}.get(self.value, None)
def translate_to_rpc(self, rpcResult):
return {
0: camera_pb2.CameraResult.UNKNOWN,
1: camera_pb2.CameraResult.SUCCESS,
2: camera_pb2.CameraResult.IN_PROGRESS,
3: camera_pb2.CameraResult.BUSY,
4: camera_pb2.CameraResult.DENIED,
5: camera_pb2.CameraResult.ERROR,
6: camera_pb2.CameraResult.TIMEOUT,
7: camera_pb2.CameraResult.WRONG_ARGUMENT
}.get(self.value, None)
def translate_to_rpc(self, rpcResult):
return {
0: camera_pb2.CameraResult.UNKNOWN,
1: camera_pb2.CameraResult.SUCCESS,
2: camera_pb2.CameraResult.IN_PROGRESS,
3: camera_pb2.CameraResult.BUSY,
4: camera_pb2.CameraResult.DENIED,
5: camera_pb2.CameraResult.ERROR,
6: camera_pb2.CameraResult.TIMEOUT,
7: camera_pb2.CameraResult.WRONG_ARGUMENT
}.get(self.value, None)
def translate_to_rpc(self, rpcResult):
return {
0: camera_pb2.CameraResult.UNKNOWN,
1: camera_pb2.CameraResult.SUCCESS,
2: camera_pb2.CameraResult.IN_PROGRESS,
3: camera_pb2.CameraResult.BUSY,
4: camera_pb2.CameraResult.DENIED,
5: camera_pb2.CameraResult.ERROR,
6: camera_pb2.CameraResult.TIMEOUT,
7: camera_pb2.CameraResult.WRONG_ARGUMENT
}.get(self.value, None)
def translate_to_rpc(self, rpcResult):
return {
0: camera_pb2.CameraResult.UNKNOWN,
1: camera_pb2.CameraResult.SUCCESS,
2: camera_pb2.CameraResult.IN_PROGRESS,
3: camera_pb2.CameraResult.BUSY,
4: camera_pb2.CameraResult.DENIED,
5: camera_pb2.CameraResult.ERROR,
6: camera_pb2.CameraResult.TIMEOUT,
7: camera_pb2.CameraResult.WRONG_ARGUMENT
}.get(self.value, None)