comparison roundup/cgi/client.py @ 1807:ea43cb3c157f

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.
author Johannes Gijsbers <jlgijsbers@users.sourceforge.net>
date Wed, 10 Sep 2003 13:04:05 +0000
parents fe9d122f1bb1
children 85fd3d0e7d81
comparison
equal deleted inserted replaced
1806:f1077d63795c 1807:ea43cb3c157f
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 $
2 2
3 __doc__ = """ 3 __doc__ = """
4 WWW request handler (also used in the stand-alone server). 4 WWW request handler (also used in the stand-alone server).
5 """ 5 """
6 6
7 import os, os.path, cgi, StringIO, urlparse, re, traceback, mimetypes, urllib 7 import os, os.path, cgi, StringIO, urlparse, re, traceback, mimetypes, urllib
8 import binascii, Cookie, time, random, MimeWriter, smtplib, socket, quopri 8 import binascii, Cookie, time, random, MimeWriter, smtplib, socket, quopri
9 import stat, rfc822, string 9 import stat, rfc822
10 10
11 from roundup import roundupdb, date, hyperdb, password, token, rcsv 11 from roundup import roundupdb, date, hyperdb, password, token, rcsv
12 from roundup.i18n import _ 12 from roundup.i18n import _
13 from roundup.cgi.templating import Templates, HTMLRequest, NoTemplate 13 from roundup.cgi.templating import Templates, HTMLRequest, NoTemplate
14 from roundup.cgi import cgitb 14 from roundup.cgi import cgitb
27 pass 27 pass
28 class NotModified(HTTPException): 28 class NotModified(HTTPException):
29 pass 29 pass
30 30
31 # used by a couple of routines 31 # used by a couple of routines
32 if hasattr(string, 'ascii_letters'): 32 chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
33 chars = string.ascii_letters+string.digits
34 else:
35 # python2.1 doesn't have ascii_letters
36 chars = string.letters+string.digits
37 33
38 # XXX actually _use_ FormError 34 # XXX actually _use_ FormError
39 class FormError(ValueError): 35 class FormError(ValueError):
40 ''' An "expected" exception occurred during form parsing. 36 ''' An "expected" exception occurred during form parsing.
41 - ie. something we know can go wrong, and don't want to alarm the 37 - ie. something we know can go wrong, and don't want to alarm the

Roundup Issue Tracker: http://roundup-tracker.org/