diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-01-25 07:57:59 -0500 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-01-25 07:57:59 -0500 |
commit | c31d8664f0c1bf78c085f0e6d83db44c81c81372 (patch) | |
tree | f64222200a7df80aff6a0a3c2a9a5e2fa76446d0 /src/lib | |
parent | e2d418287724d25e85d067672049638af022c2c3 (diff) | |
download | bcfg2-c31d8664f0c1bf78c085f0e6d83db44c81c81372.tar.gz bcfg2-c31d8664f0c1bf78c085f0e6d83db44c81c81372.tar.bz2 bcfg2-c31d8664f0c1bf78c085f0e6d83db44c81c81372.zip |
turn off web_debug by default, give a warning if it's on
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/Server/Admin/Init.py | 2 | ||||
-rw-r--r-- | src/lib/Server/Reports/settings.py | 13 |
2 files changed, 6 insertions, 9 deletions
diff --git a/src/lib/Server/Admin/Init.py b/src/lib/Server/Admin/Init.py index aba6bbd32..b7c71e9df 100644 --- a/src/lib/Server/Admin/Init.py +++ b/src/lib/Server/Admin/Init.py @@ -30,8 +30,6 @@ database_password = database_host = # Not used with sqlite3. database_port = -# Set to empty string for default. Not used with sqlite3. -web_debug = True [communication] protocol = %s diff --git a/src/lib/Server/Reports/settings.py b/src/lib/Server/Reports/settings.py index 128658ff1..2b35d0d05 100644 --- a/src/lib/Server/Reports/settings.py +++ b/src/lib/Server/Reports/settings.py @@ -11,15 +11,14 @@ if len(c.read(['/etc/bcfg2.conf', '/etc/bcfg2-web.conf'])) == 0: sys.exit(1) try: - dset = c.get('statistics', 'web_debug') + DEBUG = c.getboolean('statistics', 'web_debug') except: - dset = 'false' - -if dset == "True": - DEBUG = True -else: DEBUG = False - + +if DEBUG: + print("Warning: Setting web_debug to True causes extraordinary memory " + "leaks. Only use this setting if you know what you're doing.") + TEMPLATE_DEBUG = DEBUG ADMINS = ( |