From e5c79e066b31419ebbae43d1acff8f2c876f77c2 Mon Sep 17 00:00:00 2001 From: Daniel STAN Date: Sun, 25 Aug 2013 22:56:37 +0200 Subject: [PATCH] [annuaires_pg] correct _test mode --- gestion/annuaires_pg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'