LPCconnector/LPCBootProto.py
changeset 45 786b12887e91
parent 0 51f5a3138405
equal deleted inserted replaced
44:a6577420a27b 45:786b12887e91
     1 from LPCProto import *
     1 from LPCProto import *
     2 
     2 
     3 class LPCBootProto(LPCProto):
     3 class LPCBootProto(LPCProto):
     4     def HandleTransaction(self, transaction):
     4     def HandleTransaction(self, transaction):
     5         self.TransactionLock.acquire()
     5         res = None
     6         try:
     6         try:
     7             transaction.SetPseudoFile(self.serialPort)
     7             transaction.SetPseudoFile(self.serialPort)
     8             res = transaction.ExchangeData()
     8             res = transaction.ExchangeData()
     9         finally:
     9         except:
    10             self.TransactionLock.release()
    10             pass
    11         return "Stopped", res
    11         return "Stopped", res
    12     
    12     
    13 class LPCBootTransaction:
    13 class LPCBootTransaction:
    14     def __init__(self, optdata = ""):
    14     def __init__(self, optdata = ""):
    15         self.OptData = optdata
    15         self.OptData = optdata