Make CGI example correct for Py3
This commit is contained in:
parent
96f8a790a1
commit
eb05afdb33
|
@ -315,8 +315,8 @@ server.
|
|||
sys.stdout.write('%s: %s\r\n' % header)
|
||||
sys.stdout.write('\r\n')
|
||||
|
||||
sys.stdout.write(data) # TODO: this needs to be binary on Py3
|
||||
sys.stdout.flush()
|
||||
sys.stdout.buffer.write(data)
|
||||
sys.stdout.buffer.flush()
|
||||
|
||||
def start_response(status, response_headers, exc_info=None):
|
||||
if exc_info:
|
||||
|
|
Loading…
Reference in New Issue