quixote publish.py,1.135,1.136

Neil Schemenauer <nascheme-fVcApmY9cLvQ3/1i3zOLAti2O/[email protected]>
Newsgroups gmane.comp.web.quixote.cvs
Message-ID <[email protected]>
Update of /home/cvs/quixote
In directory hewson:/tmp/cvs-serv20374

Modified Files:
	publish.py 
Log Message:
Support htmltext as a response value.


Index: publish.py
===================================================================
RCS file: /home/cvs/quixote/publish.py,v
retrieving revision 1.135
retrieving revision 1.136
diff -u -d -r1.135 -r1.136
--- publish.py	3 Oct 2002 14:35:52 -0000	1.135
+++ publish.py	14 Oct 2002 23:00:58 -0000	1.136
@@ -15,6 +15,7 @@
     pass
 
 from quixote import errors, fcgi
+from quixote.html import htmltext
 from quixote.http_request import HTTPRequest, get_content_type
 from quixote.http_response import HTTPResponse
 
@@ -651,7 +652,7 @@
 
         # Output results from Response object
         if output:
-            request.response.set_body(output)
+            request.response.set_body(str(output))
         request.response.write(stdout)
 
     
@@ -778,7 +779,7 @@
 
 if sys.hexversion >= 0x02020000:    # Python 2.2 or greater
     def isstring (x):
-        return isinstance(x, types.StringTypes)
+        return isinstance(x, (str, unicode, htmltext))
 else:
     if hasattr(types, 'UnicodeType'):
         _string_types = (types.StringType, types.UnicodeType)
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.