def commit(self):
    if self.closed():
        raise errors.ConnectionError('Connection is closed')
    cur = self.cursor()
    cur.execute('COMMIT;')
def commit(self):
    if self.closed():
        raise errors.ConnectionError('Connection is closed')
    cur = self.cursor()
    cur.execute('COMMIT;')