Permalink
Browse files

set debug=False when application is run with mod_wsgi (tx Patrick Swi…

…eskowski)
  • Loading branch information...
1 parent 8e98d02 commit d8a8a8cf3e061b8f0290881ff9b3b07d2a1a9016 @anandology anandology committed Jun 4, 2009
Showing with 3 additions and 2 deletions.
  1. +3 −2 web/wsgi.py
View
5 web/wsgi.py
@@ -57,9 +57,10 @@ def _is_dev_mode():
# quick hack to check if the program is running in dev mode.
if os.environ.has_key('SERVER_SOFTWARE') \
or os.environ.has_key('PHP_FCGI_CHILDREN') \
- or 'fcgi' in sys.argv or 'fastcgi' in sys.argv:
+ or 'fcgi' in sys.argv or 'fastcgi' in sys.argv \
+ or 'mod_wsgi' in sys.argv:
return False
return True
# When running the builtin-server, enable debug mode if not already set.
-web.config.setdefault('debug', _is_dev_mode())
+web.config.setdefault('debug', _is_dev_mode())

0 comments on commit d8a8a8c

Please sign in to comment.