Only print the config file used in testing mode
This commit is contained in:
parent
cde7725860
commit
4bef4bb936
1 changed files with 4 additions and 3 deletions
|
@ -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'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue