objdictgen/nodemanager.py
changeset 233 6f2936f7fb3f
parent 223 461f5516176b
child 237 5dcfc996e563
equal deleted inserted replaced
232:e435bbec1759 233:6f2936f7fb3f
   629                         dic[typeindex] = typevalue
   629                         dic[typeindex] = typevalue
   630                     if type not in dic:
   630                     if type not in dic:
   631                         type = self.CurrentNode.GetEntry(type)[1]
   631                         type = self.CurrentNode.GetEntry(type)[1]
   632                     if dic[type] == 0:
   632                     if dic[type] == 0:
   633                         try:
   633                         try:
   634                             value = int(value, 16)
   634                             if value.startswith("0x"):
       
   635                                 value = int(value, 16)
       
   636                             else:
       
   637                                 value = int(value)
   635                             self.CurrentNode.SetEntry(index, subIndex, value)
   638                             self.CurrentNode.SetEntry(index, subIndex, value)
   636                         except:
   639                         except:
   637                             pass
   640                             pass
   638                     else:
   641                     else:
   639                         self.CurrentNode.SetEntry(index, subIndex, value)
   642                         self.CurrentNode.SetEntry(index, subIndex, value)