Login | Register
My pages Projects Community openCollabNet

Discussions > Commits > svn commit: r140 - trunk/repoguard: src/repoguard/handlers test/repoguard_test/handlers test/repoguard_test/modules

repoguard
Discussion topic

Back to topic list

svn commit: r140 - trunk/repoguard: src/repoguard/handlers test/repoguard_test/handlers test/repoguard_test/modules

Author schlauch
Full name Tobias Schlauch
Date 2012-10-08 08:39:15 PDT
Message Author: schlauch
Date: 2012-10-08 08:39:14-0700
New Revision: 140

Modified:
   trunk/repoguard/src/​repoguard/handlers/m​ail.py
   trunk/repoguard/test​/repoguard_test/hand​lers/test_mail.py
   trunk/repoguard/test​/repoguard_test/modu​les/test_smtp_client​.py

Log:
Added missing newline to correctly send message body.

Added optional configuration option 'local_hostname' which can be used if the automatic resolution of the smtplib does not work.

Modified: trunk/repoguard/src/​repoguard/handlers/m​ail.py
Url: http://repoguard.tig​ris.org/source/brows​e/repoguard/trunk/re​poguard/src/repoguar​d/handlers/mail.py?v​iew=diff&pathrev​=140&r1=139&​r2=140
====================​====================​====================​==================
--- trunk/repoguard/src/​repoguard/handlers/m​ail.py (original)
+++ trunk/repoguard/src/​repoguard/handlers/m​ail.py 2012-10-08 08:39:14-0700
@@ -24,6 +24,7 @@
         port = Integer(optional=True, default=25)
         user = String(optional=True, default=None)
         password = String(optional=True, default=None)
+ local_hostname = String(optional=True, default=None)
 
 class Config(HandlerConfig):
     """ General configuration. """
@@ -59,7 +60,8 @@
     def _initialize_mail_cli​ent(config):
         if config.smtp:
             mail_client = smtp_client.SmtpClientHelper(
- config.smtp.server, config.smtp.port, (config.smtp.user, config.smtp.password), config.level)
+ config.smtp.server, config.smtp.port,
+ (config.smtp.user, config.smtp.password), config.level, config.smtp.local_hostname)
         else:
             mail_client = smtp_client.SmtpClientHelper()
         return mail_client

Modified: trunk/repoguard/test​/repoguard_test/hand​lers/test_mail.py
Url: http://repoguard.tig​ris.org/source/brows​e/repoguard/trunk/re​poguard/test/repogua​rd_test/handlers/tes​t_mail.py?view=diff​&pathrev=140&​r1=139&r2=140
====================​====================​====================​==================
--- trunk/repoguard/test​/repoguard_test/hand​lers/test_mail.py (original)
+++ trunk/repoguard/test​/repoguard_test/hand​lers/test_mail.py 2012-10-08 08:39:14-0700
@@ -86,4 +86,4 @@
         protocol = self._get_protocol(s​uccess=False)
         self._handler.summar​ize(remote_config, protocol, True)
         
- assert self._mail_class.call_args[0] == ("there", 25, ("me", "secret"), 1)
+ assert self._mail_class.call_args[0] == ("there", 25, ("me", "secret"), 1, None)

Modified: trunk/repoguard/test​/repoguard_test/modu​les/test_smtp_client​.py
Url: http://repoguard.tig​ris.org/source/brows​e/repoguard/trunk/re​poguard/test/repogua​rd_test/modules/test​_smtp_client.py?view​=diff&pathrev=14​0&r1=139&r2=​140
====================​====================​====================​==================
--- trunk/repoguard/test​/repoguard_test/modu​les/test_smtp_client​.py (original)
+++ trunk/repoguard/test​/repoguard_test/modu​les/test_smtp_client​.py 2012-10-08 08:39:14-0700
@@ -21,7 +21,7 @@
     "Subject: subject\n"
     "MIME-Version: 1.0\n"
     "Content-Type: text/plain; charset=UTF-8\n"
- "Content-Transfer-Encoding: 8bit\n"
+ "Content-Transfer-Encoding: 8bit\n\n"
     "unicöde messäge")

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

svn commit: r140 - trunk/repoguard: src/repoguard/handlers test/repoguard_test/handlers test/repoguard_test/modules schlauch Tobias Schlauch 2012-10-08 08:39:15 PDT
Messages per page: