Only print the config file used in testing mode

This commit is contained in:
Pierre-Yves Chibon 2017-02-13 11:42:17 +01:00
parent cde7725860
commit 4bef4bb936

View file

@ -15,17 +15,18 @@ import requests
from sqlalchemy.exc import SQLAlchemyError
TESTING = False
if 'PAGURE_CONFIG' not in os.environ \
and os.path.exists('/etc/pagure/pagure.cfg'):
print 'Using configuration file `/etc/pagure/pagure.cfg`'
if TESTING:
print 'Using configuration file `/etc/pagure/pagure.cfg`'
os.environ['PAGURE_CONFIG'] = '/etc/pagure/pagure.cfg'
import pagure
from pagure import SESSION
from pagure.exceptions import PagureException
TESTING = False
{% if env == 'staging' %}
VCS_URL = 'https://admin.stg.fedoraproject.org/pkgdb/api/vcs?format=json'
GRP_URL = 'https://admin.stg.fedoraproject.org/pkgdb/api/groups?format=json'