Skip to content

Commit

Permalink
change spynl.spynl_environment to spynl.ops.environment (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
ev-agelos authored and softweardev committed Feb 17, 2017
1 parent dc45434 commit 4296c74
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions spynl/main/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ def send_exception_to_external_monitoring(user_info=None, exc_info=None,
if is_package_installed('raven') and settings.get('spynl.sentry_key')\
and settings.get('spynl.sentry_project'):
import raven # pylint: disable=import-error
spynl_env = settings.get('spynl.spynl_environment', 'dev')
spynl_env = settings.get('spynl.ops.environment', 'dev')
spynl_function = settings.get('spynl.function', 'all')
client = raven.Client(
dsn='https://{}@app.getsentry.com/{}'.format(
Expand Down Expand Up @@ -477,7 +477,7 @@ def is_production_environment(or_test=False):
allowed_envs = ['beta', 'production']
if or_test:
allowed_envs.append('test')
return settings.get('spynl.spynl_environment') in allowed_envs
return settings.get('spynl.ops.environment') in allowed_envs


@contextlib.contextmanager
Expand Down
2 changes: 1 addition & 1 deletion spynl/tests/test_endpoint_availability.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def non_production_endpoint(ctx, request):

monkeypatch.setattr('spynl.main.main', patched_main)
settings_ = deepcopy(settings)
settings_['spynl.spynl_environment'] = 'production'
settings_['spynl.ops.environment'] = 'production'
app = app_factory(settings_)

response = app.get('/test-endpoint', expect_errors=True)
Expand Down

0 comments on commit 4296c74

Please sign in to comment.