mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-20 04:36:06 +01:00
py3: Fix console_print
This commit is contained in:
parent
1a3d09a61b
commit
a5aec9233f
1 changed files with 3 additions and 1 deletions
|
|
@ -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…
Reference in a new issue