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

[or-cvs] r21083: {projects} Do ugly things on Roger's request (projects/gettor/lib/gettor)



Author: kaner
Date: 2009-12-01 14:52:18 -0500 (Tue, 01 Dec 2009)
New Revision: 21083

Modified:
   projects/gettor/lib/gettor/requests.py
Log:
Do ugly things on Roger's request


Modified: projects/gettor/lib/gettor/requests.py
===================================================================
--- projects/gettor/lib/gettor/requests.py	2009-12-01 19:51:02 UTC (rev 21082)
+++ projects/gettor/lib/gettor/requests.py	2009-12-01 19:52:18 UTC (rev 21083)
@@ -63,6 +63,9 @@
         log.info("User made request to %s" % self.toAddress)
         # Check if we got a '+' address
         self.matchPlusAddress()
+        # If we got a '+' address, add an ugly mapping hack
+        if self.gotPlusReq:
+            self.doUglyHack()
         # TODO XXX: 
         # Scrub this data
         self.replytoAddress = self.parsedMessage["from"]
@@ -225,3 +228,9 @@
     def getAll(self):
         return (self.replytoAddress, self.replyLocale, \
                 self.returnPackage, self.splitDelivery, self.signature)
+
+    def doUglyHack(self):
+        # Here be dragons
+        if self.replyLocale == "zh" or self.replyLocale == "chinese" \
+                             or self.repyLocale == "___":
+            self.replyLocale = "zh_CN"