DBG_ANNUAIRE: pour l'annuaire pg
This commit is contained in:
parent
927117b6dd
commit
010fe3b10e
2 changed files with 5 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
import os
|
||||
import psycopg2
|
||||
from functools import wraps
|
||||
import time
|
||||
|
@ -18,7 +19,7 @@ def _need_conn(f):
|
|||
raise NameError("La connexion à la pase postgresql ne peut être établie.")
|
||||
attempts = 0
|
||||
while not conn or not attempts:
|
||||
if __name__.endswith('annuaires_pg_test'):
|
||||
if __name__.endswith('annuaires_pg_test') or os.getenv('DBG_ANNUAIRE', False):
|
||||
host='localhost'
|
||||
else:
|
||||
host='pgsql.v4.adm.crans.org'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue