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
|
from sqlalchemy.exc import SQLAlchemyError
|
||||||
|
|
||||||
|
|
||||||
|
TESTING = False
|
||||||
|
|
||||||
if 'PAGURE_CONFIG' not in os.environ \
|
if 'PAGURE_CONFIG' not in os.environ \
|
||||||
and os.path.exists('/etc/pagure/pagure.cfg'):
|
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'
|
os.environ['PAGURE_CONFIG'] = '/etc/pagure/pagure.cfg'
|
||||||
|
|
||||||
import pagure
|
import pagure
|
||||||
from pagure import SESSION
|
from pagure import SESSION
|
||||||
from pagure.exceptions import PagureException
|
from pagure.exceptions import PagureException
|
||||||
|
|
||||||
TESTING = False
|
|
||||||
|
|
||||||
{% if env == 'staging' %}
|
{% if env == 'staging' %}
|
||||||
VCS_URL = 'https://admin.stg.fedoraproject.org/pkgdb/api/vcs?format=json'
|
VCS_URL = 'https://admin.stg.fedoraproject.org/pkgdb/api/vcs?format=json'
|
||||||
GRP_URL = 'https://admin.stg.fedoraproject.org/pkgdb/api/groups?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