[Nym3-commit] r496 - trunk/nymbaron/Server

zax at conuropsis.org zax at conuropsis.org
Mon Mar 20 17:46:21 CET 2006


Author: zax
Date: 2006-03-20 17:46:19 +0100 (Mon, 20 Mar 2006)
New Revision: 496

Modified:
   trunk/nymbaron/Server/Main.py
Log:
Use Python True and False constants instead of 0 and 1


Modified: trunk/nymbaron/Server/Main.py
===================================================================
--- trunk/nymbaron/Server/Main.py	2006-03-20 16:35:34 UTC (rev 495)
+++ trunk/nymbaron/Server/Main.py	2006-03-20 16:46:19 UTC (rev 496)
@@ -127,17 +127,17 @@
     # If more than 20% of the message consists of non-text characters,
     # then it's safe to assume it's binary.
     if txtlen / msglen > 0.20:
-        return 1
-    return 0
+        return True
+    return False
 
 def isMsgBase64(msg):
     """ Base64 payload should consist of nothing but text and newline
     characters.  Check for this and return the payload if it matches.
-    Otherwise, return 0"""
+    Otherwise, return False"""
     m = re.search('binary\n\n([\S\n]+)\n-{5}END', msg, re.S)
     if m:
         return m.group(1)
-    return 0
+    return False
 
 def processIncoming(localpart, msg):
     """Process incoming mail from the MTA



More information about the Nym3-commit mailing list