def runAutoCommit(self, func, *args, **kwargs):
        old_level = self.dbh.isolation_level
        try:
            if self.inTransaction():
                self.dbh.commit()
            self.dbh.set_isolation_level(psy_ext.ISOLATION_LEVEL_AUTOCOMMIT)
            return func(*args, **kwargs)
        finally:
            self.dbh.set_isolation_level(old_level)

    # resetting the auto increment values of primary keys
Escape CR and LF characters, and limit length.
dataset/ETHPy150Open sassoftware/conary/conary/dbstore/psycopg2_drv.py/Database.runAutoCommit--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/django/utils/log.py/AdminEmailHandler.format_subject