connectors/LPC/LPCAppProto.py
changeset 563 c74a37d156df
parent 554 6bd3f220b886
child 570 46abd6b2f639
equal deleted inserted replaced
561:4cc6eef4778f 563:c74a37d156df
    13             transaction.SendCommand()
    13             transaction.SendCommand()
    14             current_plc_status = transaction.GetCommandAck()
    14             current_plc_status = transaction.GetCommandAck()
    15             if current_plc_status is not None:
    15             if current_plc_status is not None:
    16                 res = transaction.ExchangeData()
    16                 res = transaction.ExchangeData()
    17             else:
    17             else:
    18                 raise LPCProtoError("LPC transaction error - controller did not answer as expected")
    18                 raise LPCProtoError("controller did not answer as expected")
       
    19         except Exception, e:
       
    20             raise LPCProtoError("LPC transaction error : "+str(e))
    19         finally:
    21         finally:
    20             self.TransactionLock.release()
    22             self.TransactionLock.release()
    21         return LPC_STATUS.get(current_plc_status,"Broken"), res
    23         return LPC_STATUS.get(current_plc_status,"Broken"), res
    22     
    24     
    23 class LPCAppTransaction:
    25 class LPCAppTransaction: