Django

Code

Ticket #6063: basehttp_safestring_instance.patch

File basehttp_safestring_instance.patch, 0.5 kB (added by Gasper Zejn <zejn@kiberpipa.org>, 2 years ago)

Another patch, oneliner

  • core/servers/basehttp.py

    old new  
    386386    def write(self, data): 
    387387        """'write()' callable as specified by PEP 333""" 
    388388 
    389         assert type(data) is StringType,"write() argument must be string" 
     389        assert isinstance(data, StringType),"write() argument must be string" 
    390390 
    391391        if not self.status: 
    392392            raise AssertionError("write() before start_response()")