Python exceptions.StandardError() Examples

The following are 1 code examples of exceptions.StandardError(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module exceptions , or try the search function .
Example #1
Source File: dbapi20.py    From python-phoenixdb with Apache License 2.0 6 votes vote down vote up
def tearDown(self):
        ''' self.drivers should override this method to perform required cleanup
            if any is necessary, such as deleting the test database.
            The default drops the tables that may be created.
        '''
        try:
            con = self._connect()
            try:
                cur = con.cursor()
                for ddl in (self.xddl1,self.xddl2):
                    try:
                        cur.execute(ddl)
                        con.commit()
                    except self.driver.Error:
                        # Assume table didn't exist. Other tests will check if
                        # execute is busted.
                        pass
            finally:
                con.close()
        except _BaseException:
            pass