コード例 #1
0
 def __init__(self, device):
     self.info={}
     try:
         self.info['vendor']=device.getVendor()
     except:
         self.info['vendor']='unknown'
     try:
         self.info['device']=device.getProduct()
     except:
         self.info['device']='unknown'
     try:
         self.info['type']=device.getType()
     except:
         self.info['type']='unknown'
     try:
         self.info['udi']=device.getUDI()
     except:
         self.info['udi']='unknown'
     KeyAndValue.__init__(self, self.info)
コード例 #2
0
 def __init__(self, device):
     self.info = {}
     try:
         self.info['vendor'] = device.getVendor()
     except:
         self.info['vendor'] = 'unknown'
     try:
         self.info['device'] = device.getProduct()
     except:
         self.info['device'] = 'unknown'
     try:
         self.info['type'] = device.getType()
     except:
         self.info['type'] = 'unknown'
     try:
         self.info['udi'] = device.getUDI()
     except:
         self.info['udi'] = 'unknown'
     KeyAndValue.__init__(self, self.info)
コード例 #3
0
 def __init__(self, device):
     self.info=device.getProperties()
     KeyAndValue.__init__(self, self.info)
コード例 #4
0
 def __init__(self, device):
     self.info = device.getProperties()
     KeyAndValue.__init__(self, self.info)