Exemplo n.º 1
0
 def finalize(self):
     try:
         logger = self.logger
     except AttributeError:
         pass
     else:
         Logs.free_logger(logger)
         delattr(self, 'logger')
Exemplo n.º 2
0
 def finalize(self):
     try:
         logger = self.logger
     except AttributeError:
         pass
     else:
         Logs.free_logger(logger)
         delattr(self, "logger")
Exemplo n.º 3
0
	def finalize(self):
		"""
		Called to free resources such as logger files
		"""
		try:
			logger = self.logger
		except AttributeError:
			pass
		else:
			Logs.free_logger(logger)
			delattr(self, 'logger')
Exemplo n.º 4
0
    def finalize(self):
        """
		Use to free resources such as open files potentially held by the logger
		"""
        try:
            logger = self.logger
        except AttributeError:
            pass
        else:
            Logs.free_logger(logger)
            delattr(self, 'logger')
Exemplo n.º 5
0
	def finalize(self):
		"""
		Use to free resources such as open files potentially held by the logger
		"""
		try:
			logger = self.logger
		except AttributeError:
			pass
		else:
			Logs.free_logger(logger)
			delattr(self, 'logger')
Exemplo n.º 6
0
	def finalize(self):
		"""
		Called to free resources such as logger files
		"""
		try:
			logger = self.logger
		except AttributeError:
			pass
		else:
			Logs.free_logger(logger)
			delattr(self, 'logger')
Exemplo n.º 7
0
def benchmarks_format_output (bch):
	# The logger is freed at the end of the benchmarks function but the tasks are
	# performed afterwards, so we recreate the logger.
	logfile = os.path.join (bch.bldnode.abspath(), "benchmarks_run.log")
	bch.logger = Logs.make_logger (logfile, "benchmarks_run")

	lst = sorted (getattr (bch, 'bench_results', []), key = lambda x:x[0])
	for (f, ret, log) in lst:
		bch.start_msg (f.relpath ())
		if ret == 0:
			bch.end_msg (log.relpath())
		else:
			bch.end_msg ("Error", color = "RED")

	Logs.free_logger (bch.logger)
	bch.logger = None