[annuaires_pg] correct _test mode

This commit is contained in:
Daniel STAN 2013-08-25 22:56:37 +02:00
parent 36722abc95
commit e5c79e066b

View file

@ -11,7 +11,7 @@ def _need_conn(f):
def first_connect(*args, **kwargs): def first_connect(*args, **kwargs):
global conn global conn
if conn == None: if conn == None:
if __name__ == 'annuaires_pg_test': if __name__.endswith('annuaires_pg_test'):
host='localhost' host='localhost'
else: else:
host='pgsql.adm.crans.org' host='pgsql.adm.crans.org'