Skip to content

Commit

Permalink
Allow changing environment in ini
Browse files Browse the repository at this point in the history
  • Loading branch information
Sheeo committed Nov 10, 2015
1 parent 3d7542d commit 41d9b03
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ install:
- ps: "$env:APPVEYOR_BUILD_VERSION = (& c:\\Python27\\python .\\src\\config\\version.py) + \"+\" + $env:APPVEYOR_BUILD_NUMBER"
- ps: "get-childitem env:"
- ps: "$env:PYTEST_QT_API=\"pyqt4v2\""
- ps: "$env:FAF_FORCE_PRODUCTION=true"
- "%PYTHON%\\Scripts\\pip.exe install -r requirements.txt --trusted-host content.faforever.com"

test_script:
Expand Down
3 changes: 3 additions & 0 deletions src/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ def is_development_version():
or hasattr(sys, 'frozen')
else 'development')

if _settings.contains('client/force_environment'):
environment = _settings.value('client/force_environment')

if environment == 'production':
from production import defaults

Expand Down

0 comments on commit 41d9b03

Please sign in to comment.