Skip to content

Commit d5e1fc5

Browse files
author
Johannes Gijsbers
committed
We need a stable set of chars to be able to match...
...the subject lines of registration confirmation. Py2.1's string.letters also depends on locales, so we can't use it.
1 parent 6891f32 commit d5e1fc5

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

roundup/cgi/client.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# $Id: client.py,v 1.138 2003-09-08 21:08:18 jlgijsbers Exp $
1+
# $Id: client.py,v 1.139 2003-09-10 13:04:05 jlgijsbers Exp $
22

33
__doc__ = """
44
WWW request handler (also used in the stand-alone server).
55
"""
66

77
import os, os.path, cgi, StringIO, urlparse, re, traceback, mimetypes, urllib
88
import binascii, Cookie, time, random, MimeWriter, smtplib, socket, quopri
9-
import stat, rfc822, string
9+
import stat, rfc822
1010

1111
from roundup import roundupdb, date, hyperdb, password, token, rcsv
1212
from roundup.i18n import _
@@ -29,11 +29,7 @@ class NotModified(HTTPException):
2929
pass
3030

3131
# used by a couple of routines
32-
if hasattr(string, 'ascii_letters'):
33-
chars = string.ascii_letters+string.digits
34-
else:
35-
# python2.1 doesn't have ascii_letters
36-
chars = string.letters+string.digits
32+
chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
3733

3834
# XXX actually _use_ FormError
3935
class FormError(ValueError):

0 commit comments

Comments
 (0)