Python 2.2.2 changes the default for Message.get() ... (quixote/server/medusa_http.py)
Andrew Kuchling <akuchlin-fVcApmY9cLvQ3/1i3zOLAti2O/[email protected]> Wed, 11 Dec 2002 11:31:53 -0500
| Newsgroups | gmane.comp.web.quixote.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /home/cvs/quixote/server
In directory hewson:/tmp/cvs-serv23051/server
Modified Files:
medusa_http.py
Log Message:
Python 2.2.2 changes the default for Message.get() from '' to None;
fix from David Edwards to turn None values into ''
Index: medusa_http.py
===================================================================
RCS file: /home/cvs/quixote/server/medusa_http.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- medusa_http.py 20 Nov 2002 19:43:23 -0000 1.5
+++ medusa_http.py 11 Dec 2002 16:31:51 -0000 1.6
@@ -62,6 +62,9 @@
'SERVER_PROTOCOL':'HTTP/1.1',
'SERVER_SOFTWARE':self.server_name,
}
+ for k,v in environ.items():
+ if v == None:
+ environ[k] = ''
stdin = StringIO(data)
qreq = HTTPRequest(stdin, environ)