[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r18032: {projects} Minor cleanup: Make sendPackageHelp() look more like the res (projects/gettor)



Author: kaner
Date: 2009-01-08 19:58:22 -0500 (Thu, 08 Jan 2009)
New Revision: 18032

Modified:
   projects/gettor/gettor_responses.py
Log:
Minor cleanup: Make sendPackageHelp() look more like the rest


Modified: projects/gettor/gettor_responses.py
===================================================================
--- projects/gettor/gettor_responses.py	2009-01-08 19:44:59 UTC (rev 18031)
+++ projects/gettor/gettor_responses.py	2009-01-09 00:58:22 UTC (rev 18032)
@@ -69,13 +69,17 @@
     def sendPackageHelp(self, packageList, source, destination):
         """ Send a helpful message to the user interacting with us """
         self.setLang(self.mailLang)
-        message = [_('Hello, This is the "gettor" robot.\n\n')]
-        message.append(_("Your request was not understood. Please select one of the following package names:\n\n"))
+        message = _("""
+    Hello, This is the "gettor" robot.
+        
+    I am sorry, but your request was not understood. Please select one of the 
+    following package names:
 
-        for key in packageList.keys():
-            message.append(key + "\n")
-        message.append(_("\nPlease send me another email.\nIt only needs a single package name anywhere in the body of your email.\n"))
-        help = self.constructMessage(''.join(message), source, destination)
+    """ + "".join([ "\t%s\n" % key for key in packageList.keys()]) + """
+    Please send me another email. It only needs a single package name anywhere 
+    in the body of your email.
+        """)
+        help = self.constructMessage(message, source, destination)
         try:
             status = self.sendMessage(help, source, destination)
         except: