Mercurial > p > roundup > code
comparison roundup/cgi/client.py @ 1798:9bd553ea75fa
py2.1 fix
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Sun, 07 Sep 2003 22:12:24 +0000 |
| parents | bcdb2ed730b5 |
| children | 071ea6fc803f |
comparison
equal
deleted
inserted
replaced
| 1797:c1eec970d5c0 | 1798:9bd553ea75fa |
|---|---|
| 1 # $Id: client.py,v 1.134 2003-09-06 09:45:30 jlgijsbers Exp $ | 1 # $Id: client.py,v 1.135 2003-09-07 22:12:24 richard 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 |
| 30 # set to indicate to roundup not to actually _send_ email | 30 # set to indicate to roundup not to actually _send_ email |
| 31 # this var must contain a file to write the mail to | 31 # this var must contain a file to write the mail to |
| 32 SENDMAILDEBUG = os.environ.get('SENDMAILDEBUG', '') | 32 SENDMAILDEBUG = os.environ.get('SENDMAILDEBUG', '') |
| 33 | 33 |
| 34 # used by a couple of routines | 34 # used by a couple of routines |
| 35 chars = string.ascii_letters+string.digits | 35 if hasattr(string, 'ascii_letters'): |
| 36 chars = string.ascii_letters+string.digits | |
| 37 else: | |
| 38 # python2.1 doesn't have ascii_letters | |
| 39 chars = string.letters+string.digits | |
| 36 | 40 |
| 37 # XXX actually _use_ FormError | 41 # XXX actually _use_ FormError |
| 38 class FormError(ValueError): | 42 class FormError(ValueError): |
| 39 ''' An "expected" exception occurred during form parsing. | 43 ''' An "expected" exception occurred during form parsing. |
| 40 - ie. something we know can go wrong, and don't want to alarm the | 44 - ie. something we know can go wrong, and don't want to alarm the |
