def load_process_line(self, arg_line): if SysUtils.found(arg_line.find("ForceCommand")): my_glb, my_loc = SysUtils.exec_content(arg_line) self.load_gen_info(my_loc["ForceCommand"]) self.detail_flags |= SummaryDetail.ForceCmd elif SysUtils.found(arg_line.find("ForceResult")): my_glb, my_loc = SysUtils.exec_content(arg_line) self.load_gen_result(my_loc["ForceResult"]) self.detail_flags |= SummaryDetail.ForceResult elif SysUtils.found(arg_line.find("ISSCommand")): my_glb, my_loc = SysUtils.exec_content(arg_line) self.load_iss_info(my_loc["ISSCommand"]) self.detail_flags |= SummaryDetail.IssCmd elif SysUtils.found(arg_line.find("ISSResult")): my_glb, my_loc = SysUtils.exec_content(arg_line) self.load_iss_result(my_loc["ISSResult"]) self.detail_flags |= SummaryDetail.IssResult
def load(self, arg_ctrl_item ): super().load( arg_ctrl_item ) # Msg.dbg( "FileController::load()" ) self.parent_fctrl = self.ctrl_item.file_path() # Msg.dbg( "File Path: %s" % ( self.parent_fctrl )) #my_content = open( self.parent_fctrl ).read() # Msg.dbg( "\n" + my_content ) try: my_content = open( self.parent_fctrl ).read() except Exception as arg_ex: Msg.err( "Message: %s, Control File Path: %s" % ( str( arg_ex ), self.parent_fctrl )) my_err_queue_item = SummaryErrorQueueItem( { "error" : arg_ex , "message": "Control File Not Found ..." , "path" : self.ctrl_item.file_path() , "type" : str( type( arg_ex )) } ) self.ctrl_item.summary().queue.enqueue( my_err_queue_item ) return False finally: pass try: my_glb, my_loc = SysUtils.exec_content( my_content ) except Exception as arg_ex: my_exc_type, my_exc_val, my_exc_tb = sys.exc_info() my_ex = arg_ex Msg.err( "Message: %s, Control File Path: %s" % ( str( arg_ex ), self.parent_fctrl)) Msg.blank() my_err_queue_item = SummaryErrorQueueItem( { "error" : arg_ex , "message": "Control File not processed..." , "path" : self.ctrl_item.file_path() , "type" : str( my_exc_type ) } ) self.ctrl_item.summary().queue.enqueue( my_err_queue_item ) return False finally: pass self.fcontrol = my_loc["control_items"] return True