CVS: tmda/TMDA/pythonlib/email Generator.py,1.5,1.6 __init__.py,1.10,1.11

"Jason R. Mastaler" <[email protected]>
Newsgroups gmane.mail.spam.tmda.cvs
Message-ID <[email protected]>
Update of /cvsroot/tmda/tmda/TMDA/pythonlib/email
In directory sc8-pr-cvs1:/tmp/cvs-serv4482

Modified Files:
	Generator.py __init__.py 
Log Message:
sync with email v2.5.3

Index: Generator.py
===================================================================
RCS file: /cvsroot/tmda/tmda/TMDA/pythonlib/email/Generator.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Generator.py	7 Mar 2003 23:58:47 -0000	1.5
+++ Generator.py	3 Jun 2003 00:32:43 -0000	1.6
@@ -5,6 +5,7 @@
 """
 
 import re
+import sys
 import time
 import locale
 import random
@@ -356,11 +357,14 @@
 
 
 # Helper
+_width = len(repr(sys.maxint-1))
+_fmt = '%%0%dd' % _width
+
 def _make_boundary(text=None):
     # Craft a random boundary.  If text is given, ensure that the chosen
     # boundary doesn't appear in the text.
-    dp = locale.localeconv().get('decimal_point', '.')
-    boundary = ('=' * 15) + repr(random.random()).split(dp)[1] + '=='
+    token = random.randint(0, sys.maxint-1)
+    boundary = ('=' * 15) + (_fmt % token) + '=='
     if text is None:
         return boundary
     b = boundary

Index: __init__.py
===================================================================
RCS file: /cvsroot/tmda/tmda/TMDA/pythonlib/email/__init__.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- __init__.py	15 May 2003 21:54:51 -0000	1.10
+++ __init__.py	3 Jun 2003 00:32:44 -0000	1.11
@@ -4,7 +4,7 @@
 """A package for parsing, handling, and generating email messages.
 """
 
-__version__ = '2.5.2'
+__version__ = '2.5.3'
 
 __all__ = [
     'base64MIME',

_______________________________________
tmda-cvs mailing list
http://tmda.net/lists/listinfo/tmda-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.