mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
py3: Fix console_print
This commit is contained in:
parent
1a3d09a61b
commit
a5aec9233f
@ -68,7 +68,9 @@ def console_print(ctx, rd):
|
||||
raise HTTPForbidden('console printing is not allowed')
|
||||
with print_lock:
|
||||
print(rd.remote_addr, end=' ')
|
||||
shutil.copyfileobj(rd.request_body_file, sys.stdout)
|
||||
stdout = getattr(sys.stdout, 'buffer', sys.stdout)
|
||||
shutil.copyfileobj(rd.request_body_file, stdout)
|
||||
stdout.flush()
|
||||
return ''
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user