diff options
author | Rodney Ewing <ewing.rj@gmail.com> | 2013-06-25 13:37:21 -0700 |
---|---|---|
committer | Rodney Ewing <ewing.rj@gmail.com> | 2013-06-25 13:37:21 -0700 |
commit | af4414a85f3354a432e29ecf8cf39ffd926371e3 (patch) | |
tree | 34da18957bceb784aff8cd5c413fa8e8273068e9 /mediagoblin/tools | |
parent | 5a1be074c0522c2151ab735eeb30a60c07ff7f7c (diff) | |
parent | 7fa4e19fc4e7d04175549ea2f21f8b741fbe69f2 (diff) | |
download | mediagoblin-af4414a85f3354a432e29ecf8cf39ffd926371e3.tar.lz mediagoblin-af4414a85f3354a432e29ecf8cf39ffd926371e3.tar.xz mediagoblin-af4414a85f3354a432e29ecf8cf39ffd926371e3.zip |
Merge remote-tracking branch 'upstream/master' into auth
Conflicts:
mediagoblin/app.py
mediagoblin/auth/forms.py
mediagoblin/auth/tools.py
mediagoblin/db/migrations.py
mediagoblin/db/models.py
mediagoblin/edit/views.py
mediagoblin/plugins/basic_auth/tools.py
mediagoblin/tests/test_edit.py
Diffstat (limited to 'mediagoblin/tools')
-rw-r--r-- | mediagoblin/tools/mail.py | 7 | ||||
-rw-r--r-- | mediagoblin/tools/response.py | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/mediagoblin/tools/mail.py b/mediagoblin/tools/mail.py index 6886c859..0fabc5a9 100644 --- a/mediagoblin/tools/mail.py +++ b/mediagoblin/tools/mail.py @@ -90,7 +90,12 @@ def send_email(from_addr, to_addrs, subject, message_body): if common.TESTS_ENABLED or mg_globals.app_config['email_debug_mode']: mhost = FakeMhost() elif not mg_globals.app_config['email_debug_mode']: - mhost = smtplib.SMTP( + if mg_globals.app_config['email_smtp_use_ssl']: + smtp_init = smtplib.SMTP_SSL + else: + smtp_init = smtplib.SMTP + + mhost = smtp_init( mg_globals.app_config['email_smtp_host'], mg_globals.app_config['email_smtp_port']) diff --git a/mediagoblin/tools/response.py b/mediagoblin/tools/response.py index aaf31d0b..0be1f835 100644 --- a/mediagoblin/tools/response.py +++ b/mediagoblin/tools/response.py @@ -77,7 +77,7 @@ def render_http_exception(request, exc, description): elif stock_desc and exc.code == 404: return render_404(request) - return render_error(request, title=exc.args[0], + return render_error(request, title='{0} {1}'.format(exc.code, exc.name), err_msg=description, status=exc.code) |