summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMicah Lee <micah@micahflee.com>2016-09-06 18:44:35 -0700
committerMicah Lee <micah@micahflee.com>2016-09-06 18:44:35 -0700
commite093c7298a687d8b1bf5c01b0193ca38f720e6fd (patch)
tree0c9bf2bcfad4b508ac83150c772e25c33c9ce0e6
parent7ab936cec20322c6c530e1b62c18e1a07497b86e (diff)
downloadonionshare-e093c7298a687d8b1bf5c01b0193ca38f720e6fd.tar.gz
onionshare-e093c7298a687d8b1bf5c01b0193ca38f720e6fd.zip
Disable writing to stdout in Windows (fixes #304)
-rw-r--r--onionshare/web.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/onionshare/web.py b/onionshare/web.py
index f0cb830b..f32f13da 100644
--- a/onionshare/web.py
+++ b/onionshare/web.py
@@ -243,8 +243,8 @@ def download(slug_candidate):
downloaded_bytes = fp.tell()
percent = (1.0 * downloaded_bytes / zip_filesize) * 100
- # suppress stdout platform on OSX (#203)
- if helpers.get_platform() != 'Darwin':
+ # only output to stdout in Linux (#203, #304)
+ if helpers.get_platform() == 'Linux':
sys.stdout.write(
"\r{0:s}, {1:.2f}% ".format(helpers.human_readable_filesize(downloaded_bytes), percent))
sys.stdout.flush()