Asbool the email debug mode option
authorChristopher Allan Webber <cwebber@dustycloud.org>
Sun, 8 May 2011 15:07:39 +0000 (10:07 -0500)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Sun, 8 May 2011 15:07:39 +0000 (10:07 -0500)
mediagoblin/app.py
mediagoblin/celery_setup/from_celery.py

index 913e530ea97ba709e646fa6a02b28832e0a1897d..2a2f21cc79d986a2ed7224b6ffef93c57bbfbfbf 100644 (file)
@@ -18,7 +18,7 @@ import urllib
 
 import routes
 import mongokit
-from paste.deploy.converters import asint
+from paste.deploy.converters import asbool, asint
 from webob import Request, exc
 
 from mediagoblin import routing, util, models, storage, staticdirect
@@ -148,7 +148,7 @@ def paste_app_factory(global_config, **app_config):
         staticdirector=staticdirector,
         email_sender_address=app_config.get(
             'email_sender_address', 'notice@mediagoblin.example.org'),
-        email_debug_mode=app_config.get('email_debug_mode'),
+        email_debug_mode=asbool(app_config.get('email_debug_mode')),
         user_template_path=app_config.get('local_templates'))
 
     return mgoblin_app
index 6561c622571e4e496fe57a48cd6e0f0fac7d0ccc..55e638b982934af2afdab7700b16212af2e8e4ef 100644 (file)
@@ -18,7 +18,7 @@ import os
 
 import mongokit
 from paste.deploy.loadwsgi import NicerConfigParser
-from paste.deploy.converters import asint
+from paste.deploy.converters import asint, asbool
 
 from mediagoblin import storage, models
 from mediagoblin.celery_setup import setup_celery_from_config
@@ -86,7 +86,7 @@ def setup_self(setup_globals_func=setup_globals):
         db_connection=connection,
         database=db,
         public_store=public_store,
-        email_debug_mode=mgoblin_section.get('email_debug_mode'),
+        email_debug_mode=asbool(mgoblin_section.get('email_debug_mode')),
         email_sender_address=mgoblin_section.get(
             'email_sender_address', 
             'notice@mediagoblin.example.org'),