Ticket #6063: basehttp_safestring.patch
File basehttp_safestring.patch, 811 bytes (added by , 17 years ago) |
---|
-
django/core/servers/basehttp.py
9 9 10 10 from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer 11 11 from types import ListType, StringType 12 from django.utils.safestring import SafeString 12 13 import mimetypes 13 14 import os 14 15 import re … … 385 386 386 387 def write(self, data): 387 388 """'write()' callable as specified by PEP 333""" 389 assert type(data) in (StringType, SafeString), \ 390 "write() argument must be string" 388 391 389 assert type(data) is StringType,"write() argument must be string"390 391 392 if not self.status: 392 393 raise AssertionError("write() before start_response()") 393 394