summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2012-08-16 13:01:16 +0200
committerAymeric Augustin <aymeric.augustin@m4x.org>2012-08-16 13:01:16 +0200
commitfcc8de0598f5a2024ad8a49e9bc38912b9511ca7 (patch)
tree47ed579aad8c924b4ba513de5bf1f6d3574246b2 /django
parent8c356acf2e6896759e6ca7a369f0b04766a928f3 (diff)
[py3] Ported django.core.servers.
Diffstat (limited to 'django')
-rw-r--r--django/core/servers/basehttp.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/django/core/servers/basehttp.py b/django/core/servers/basehttp.py
index 2db4e5ef6a..ce1558a924 100644
--- a/django/core/servers/basehttp.py
+++ b/django/core/servers/basehttp.py
@@ -7,6 +7,8 @@ This is a simple server for use in testing or debugging Django apps. It hasn't
been reviewed for security issues. DON'T USE IT FOR PRODUCTION USE!
"""
+from __future__ import unicode_literals
+
import os
import socket
import sys
@@ -71,12 +73,12 @@ class WSGIServerException(Exception):
class ServerHandler(simple_server.ServerHandler, object):
- error_status = "500 INTERNAL SERVER ERROR"
+ error_status = str("500 INTERNAL SERVER ERROR")
def write(self, data):
- """'write()' callable as specified by PEP 333"""
+ """'write()' callable as specified by PEP 3333"""
- assert isinstance(data, str), "write() argument must be string"
+ assert isinstance(data, bytes), "write() argument must be bytestring"
if not self.status:
raise AssertionError("write() before start_response()")