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

[or-cvs] r15909: Fix for quadratic speed increase on string operations by And (projects/gettor)



Author: ioerror
Date: 2008-07-14 21:55:29 -0400 (Mon, 14 Jul 2008)
New Revision: 15909

Modified:
   projects/gettor/gettor.py
Log:
Fix for quadratic speed increase on string operations by Andy Isaacson.


Modified: projects/gettor/gettor.py
===================================================================
--- projects/gettor/gettor.py	2008-07-15 01:09:57 UTC (rev 15908)
+++ projects/gettor/gettor.py	2008-07-15 01:55:29 UTC (rev 15909)
@@ -131,12 +131,12 @@
             gettor_responses.sendPackage(message, srcEmail, replyTo, packageList[package])  
             exit(0)
         else:
-            message = "Hello, I'm a robot. " + \
-            "Your request was not understood. Please select one of the following package names: \n"
+            message = ["Hello, I'm a robot. "]
+            message.append("Your request was not understood. Please select one of the following package names:\n")
 
             for key in packageList.keys():
-                message += key + " \n"
-            message += "Please send me another email. It only needs a single package name anywhere in the body of your email.\n"
-            gettor_responses.sendHelp(message, srcEmail, replyTo)
+                message.append(key + "\n")
+            message.append("Please send me another email. It only needs a single package name anywhere in the body of your email.\n")
+            gettor_responses.sendHelp(''.join(message), srcEmail, replyTo)
             syslog.syslog("gettor: Signed messaged to gettor. We issued some help about proper email formatting.")
             exit(0)