

def is_disconnect(self, e, connection, cursor):
    return ('connection is closed' in str(e))

dataset/ETHPy150Open zzzeek/sqlalchemy/lib/sqlalchemy/dialects/postgresql/pypostgresql.py PGDialect_pypostgresql.is_disconnect/original