Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix detection of development/production mode. #109

Merged
merged 1 commit into from

3 participants

@nex3
Collaborator

As of the 1.7.6 SDK, the DATACENTER environment variable was set in development.

@nex3 nex3 Fix detection of development/production mode.
As of the 1.7.6 SDK, the DATACENTER environment variable was set in development.
fbde5b2
@munificent
Collaborator

:jeans:

@sethladd
Owner

FTR, I applied this patch locally, and now my local dev server is truly running in "dev mode"

@nex3 nex3 merged commit ec79cbc into master
@nex3 nex3 deleted the dev-mode branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 21, 2013
  1. @nex3

    Fix detection of development/production mode.

    nex3 authored
    As of the 1.7.6 SDK, the DATACENTER environment variable was set in development.
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 app/handlers/__init__.py
View
4 app/handlers/__init__.py
@@ -274,12 +274,12 @@ def is_current_user_dogfooder():
def is_production():
"""Return whether we're running in production mode."""
- return bool(os.environ.get('DATACENTER'))
+ return not is_dev_server()
def is_dev_server():
"""Return whether we're running on locally or on AppEngine.
- Note that this returns True in tests so that the test appear to run in a
+ Note that this returns False in tests so that the test appear to run in a
non-dev-server-like environment.
"""
return os.environ['SERVER_SOFTWARE'].startswith('Development')
Something went wrong with that request. Please try again.