From f9656d31bdd3e4093359c3d00d15d8c115f71723 Mon Sep 17 00:00:00 2001 From: Nicolas Dandrimont Date: Sun, 27 Feb 2011 13:55:22 +0100 Subject: [PATCH] =?UTF-8?q?[annuaires=5Fpg]=20Cr=C3=A9ation=20d'un=20annua?= =?UTF-8?q?ires=5Fpg=5Ftest?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit darcs-hash:20110227125522-ffbb2-deb8333b994c48a86651aacac4adf04f05bd8e46.gz --- gestion/annuaires_pg.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gestion/annuaires_pg.py b/gestion/annuaires_pg.py index 4c5e3003..ad091b37 100755 --- a/gestion/annuaires_pg.py +++ b/gestion/annuaires_pg.py @@ -4,7 +4,10 @@ import psycopg2 try: - conn = psycopg2.connect("user=crans dbname=switchs host=pgsql.adm.crans.org") + if __name__ == 'annuaires_pg_test': + conn = psycopg2.connect("user=crans dbname=switchs host=localhost") + else: + conn = psycopg2.connect("user=crans dbname=switchs host=pgsql.adm.crans.org") # Population de la tâble avec les bâtiments cur = conn.cursor()