make ssl determination a bit more robust
authorDavid Ascher <david@mozillamessaging.com>
Wed, 14 Jan 2009 10:37:27 -0800
changeset 31 ed8b1d87d0f68aa709eed184dcd22b51f27482f5
parent 30 810cdf745855f0a2387594c92ec0626d1757f778
child 32 f841237f781476cf374dea72fccf5e390bcc2824
push id1
push userroot
push dateWed, 08 Apr 2009 01:46:05 +0000
make ssl determination a bit more robust
server/python/junius/bootstrap.py
--- a/server/python/junius/bootstrap.py
+++ b/server/python/junius/bootstrap.py
@@ -19,17 +19,17 @@ def setup_account(dbs):
     # example:
     #  mail.example.com,993,bob@example.com,sekret,True
     import os, os.path
     configPath = os.path.join(os.environ['HOME'], ".junius")
     f = open(configPath, 'r')
     data = f.read()
     f.close()
     host, portstr, username, password, sslstr = data.split(',')
-    ssl = not (sslstr.lower() in ['false', 'f', 'no', '0'])
+    ssl = not (sslstr.strip().lower() in ['false', 'f', 'no', '0'])
     
     account = model.Account(
         kind='imap', host=host, port=int(portstr), ssl=ssl,
         username=username, password=password,
     )
     account.store(dbs.accounts)
 
 def path_part_nuke(path, count):