aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/util.py
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2011-07-13 23:14:42 -0500
committerChristopher Allan Webber <cwebber@dustycloud.org>2011-07-13 23:14:42 -0500
commitc47c37ed953689e70441c4c143e4c06f1645be7d (patch)
treef63fed482a8e9c8dcd54cf0bd18d747f8516179b /mediagoblin/util.py
parent59051a23f01eb49ed6fe6975991730021ac169ac (diff)
parent6ae8b541f957b49ae86051814097e769d20f29af (diff)
downloadmediagoblin-c47c37ed953689e70441c4c143e4c06f1645be7d.tar.lz
mediagoblin-c47c37ed953689e70441c4c143e4c06f1645be7d.tar.xz
mediagoblin-c47c37ed953689e70441c4c143e4c06f1645be7d.zip
Merge branch 'master' into f411_new_migrations
Conflicts: mediagoblin/db/open.py
Diffstat (limited to 'mediagoblin/util.py')
-rw-r--r--mediagoblin/util.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/mediagoblin/util.py b/mediagoblin/util.py
index 7b1e4a2a..9c4d024a 100644
--- a/mediagoblin/util.py
+++ b/mediagoblin/util.py
@@ -265,9 +265,9 @@ def send_email(from_addr, to_addrs, subject, message_body):
- message_body: email body text
"""
# TODO: make a mock mhost if testing is enabled
- if TESTS_ENABLED or mg_globals.email_debug_mode:
+ if TESTS_ENABLED or mg_globals.app_config['email_debug_mode']:
mhost = FakeMhost()
- elif not mg_globals.email_debug_mode:
+ elif not mg_globals.app_config['email_debug_mode']:
mhost = smtplib.SMTP()
mhost.connect()
@@ -280,7 +280,7 @@ def send_email(from_addr, to_addrs, subject, message_body):
if TESTS_ENABLED:
EMAIL_TEST_INBOX.append(message)
- if getattr(mg_globals, 'email_debug_mode', False):
+ if mg_globals.app_config['email_debug_mode']:
print u"===== Email ====="
print u"From address: %s" % message['From']
print u"To addresses: %s" % message['To']