diff --git a/gestion/annuaires_pg.py b/gestion/annuaires_pg.py index ad091b37..2c68000d 100755 --- a/gestion/annuaires_pg.py +++ b/gestion/annuaires_pg.py @@ -15,6 +15,7 @@ try: cur.execute("SELECT DISTINCT batiment FROM prises") bat_switchs = [i[0] for i in cur.fetchall()] cur.close() + del cur except psycopg2.OperationalError: bat_switchs = ["a", "b", "c", "g", "h", "i", "j", "m", "o", "p"]