def _close_database(self):
        try:
            funs = [conn.close for conn in db.connections]
        except AttributeError:
            if hasattr(db, 'close_old_connections'):  # Django 1.6+
                funs = [db.close_old_connections]
            else:
                funs = [db.close_connection]  # pre multidb

        for close in funs:
            try:
                close()
            except DATABASE_ERRORS as exc:
                str_exc = str(exc)
                if str_exc not in 'closed' and 'not connected' not in str_exc:
                    raise
dataset/ETHPy150Open celery/django-celery/djcelery/loaders.py/DjangoLoader._close_database/swapped operands of `not in`