canfestival/canfestival.py
changeset 2429 15f18dc8b56a
parent 2418 5587c490a070
child 2437 105c20fdeb19
equal deleted inserted replaced
2428:e0f16317668e 2429:15f18dc8b56a
   449         prefix = "_".join(map(str, current_location))
   449         prefix = "_".join(map(str, current_location))
   450         Gen_OD_path = os.path.join(buildpath, "OD_%s.c" % prefix)
   450         Gen_OD_path = os.path.join(buildpath, "OD_%s.c" % prefix)
   451         # Create a new copy of the model with DCF loaded with PDO mappings for desired location
   451         # Create a new copy of the model with DCF loaded with PDO mappings for desired location
   452         try:
   452         try:
   453             master, pointers = config_utils.GenerateConciseDCF(locations, current_location, self, self.CanFestivalNode.getSync_TPDOs(), "OD_%s" % prefix)
   453             master, pointers = config_utils.GenerateConciseDCF(locations, current_location, self, self.CanFestivalNode.getSync_TPDOs(), "OD_%s" % prefix)
   454         except config_utils.PDOmappingException, e:
   454         except config_utils.PDOmappingException as e:
   455             raise Exception(e.message)
   455             raise Exception(e.message)
   456         # Do generate C file.
   456         # Do generate C file.
   457         res = gen_cfile.GenerateFile(Gen_OD_path, master, pointers)
   457         res = gen_cfile.GenerateFile(Gen_OD_path, master, pointers)
   458         if res:
   458         if res:
   459             raise Exception(res)
   459             raise Exception(res)