- def _handle_status(self, status, gen_error_msg):
- if status == native_bt.GRAPH_STATUS_CANCELED:
- raise bt2.GraphCanceled
- elif status == native_bt.GRAPH_STATUS_END:
- raise bt2.Stop
- elif status == native_bt.GRAPH_STATUS_AGAIN:
- raise bt2.TryAgain
- elif status < 0:
- raise bt2.Error(gen_error_msg)