mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-18 10:47:30 -05:00
Disable writing to stdout in Windows (fixes #304)
This commit is contained in:
parent
7ab936cec2
commit
e093c7298a
@ -243,8 +243,8 @@ def download(slug_candidate):
|
|||||||
downloaded_bytes = fp.tell()
|
downloaded_bytes = fp.tell()
|
||||||
percent = (1.0 * downloaded_bytes / zip_filesize) * 100
|
percent = (1.0 * downloaded_bytes / zip_filesize) * 100
|
||||||
|
|
||||||
# suppress stdout platform on OSX (#203)
|
# only output to stdout in Linux (#203, #304)
|
||||||
if helpers.get_platform() != 'Darwin':
|
if helpers.get_platform() == 'Linux':
|
||||||
sys.stdout.write(
|
sys.stdout.write(
|
||||||
"\r{0:s}, {1:.2f}% ".format(helpers.human_readable_filesize(downloaded_bytes), percent))
|
"\r{0:s}, {1:.2f}% ".format(helpers.human_readable_filesize(downloaded_bytes), percent))
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
|
Loading…
Reference in New Issue
Block a user