diff --git a/gestion/annuaires_pg.py b/gestion/annuaires_pg.py index eb8e1c81..710284c1 100755 --- a/gestion/annuaires_pg.py +++ b/gestion/annuaires_pg.py @@ -11,7 +11,7 @@ def _need_conn(f): def first_connect(*args, **kwargs): global conn if conn == None: - if __name__ == 'annuaires_pg_test': + if __name__.endswith('annuaires_pg_test'): host='localhost' else: host='pgsql.adm.crans.org'