diff options
author | David Rousselie <dax@happycoders.org> | 2008-03-10 14:11:50 +0300 |
---|---|---|
committer | David Rousselie <dax@happycoders.org> | 2008-03-10 14:11:50 +0300 |
commit | 7cd473ecafc052611ad6d624edd950731d67fd17 (patch) | |
tree | d896c3b04da7867301c55b8b7bcfee7b52beb6d0 | |
parent | d4de07becce14ee882c1929620ada21ce04d916d (diff) |
Fix a typing bug in SMTPAccount
darcs-hash:20080310111150-86b55-6a62a729d02d870e2160007bc9d485d9d6883657.gz
-rw-r--r-- | src/jmc/model/account.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/jmc/model/account.py b/src/jmc/model/account.py index 194d6fe..49a30db 100644 --- a/src/jmc/model/account.py +++ b/src/jmc/model/account.py @@ -763,6 +763,16 @@ class SMTPAccount(Account): smtp_connection = smtplib.SMTP() if self.__logger.getEffectiveLevel() == logging.DEBUG: smtp_connection.set_debuglevel(1) + + # It seems there is a bug that set self.port to something that is + # not an integer. How ? Here is a temporary workaround. + from types import IntType + if type(self.port) != IntType: + self.__logger.debug("BUG: SMTPAccount.port is not an integer: " + + str(type(self.port)) + ", value: " + + str(self.port)) + self.port = int(self.port) + smtp_connection.connect(self.host, self.port) self.__say_hello(smtp_connection) if self.tls: |