示例#1
0
    def __exit__(self, exc_type, exc_val, exc_tb):
        """
        Context manager interface to exit with-as context.

        Returns False to propagate potential exception, else True.
        """
        self.log("Cleaning up", self.log.INFO)
        self.errlog.close()
        self.log.close_logfile()
        if self.security != "server":
            SetConnections.CloseConnections()

        return False
示例#2
0
    def __exit__(self, exc_type, exc_val, exc_tb):
        """
        Context manager interface to exit with-as context.

        Returns False to propagate potential exception, else True.
        """
        log.Log("Cleaning up", log.INFO)
        if hasattr(self, 'repo'):
            self.repo.exit()
        if self.security != "server":
            log.ErrorLog.close()
            log.Log.close_logfile()
            SetConnections.CloseConnections()

        return False
示例#3
0
	def tearDown(self):
		print "Taking down connections"
		SetConnections.CloseConnections()