Make CGI example correct for Py3

This commit is contained in:
Phillip J. Eby 2011-01-07 04:29:14 +00:00
parent 96f8a790a1
commit eb05afdb33
1 changed files with 2 additions and 2 deletions

View File

@ -315,8 +315,8 @@ server.
sys.stdout.write('%s: %s\r\n' % header) sys.stdout.write('%s: %s\r\n' % header)
sys.stdout.write('\r\n') sys.stdout.write('\r\n')
sys.stdout.write(data) # TODO: this needs to be binary on Py3 sys.stdout.buffer.write(data)
sys.stdout.flush() sys.stdout.buffer.flush()
def start_response(status, response_headers, exc_info=None): def start_response(status, response_headers, exc_info=None):
if exc_info: if exc_info: