mail: fix regression when parsing unset smtp.tls option
authorPatrick Mezard <pmezard@gmail.com>
Fri, 07 Jan 2011 20:50:42 +0100
changeset 13244 d8f92c3a17d6
parent 13243 159651b3c9ec
child 13245 0b2407ee081b
mail: fix regression when parsing unset smtp.tls option
mercurial/mail.py
--- a/mercurial/mail.py	Fri Jan 07 20:50:41 2011 +0100
+++ b/mercurial/mail.py	Fri Jan 07 20:50:42 2011 +0100
@@ -33,7 +33,7 @@
 def _smtp(ui):
     '''build an smtp connection and return a function to send mail'''
     local_hostname = ui.config('smtp', 'local_hostname')
-    tls = ui.config('smtp', 'tls')
+    tls = ui.config('smtp', 'tls', 'none')
     # backward compatible: when tls = true, we use starttls.
     starttls = tls == 'starttls' or util.parsebool(tls)
     smtps = tls == 'smtps'