aboutsummaryrefslogtreecommitdiffstats
path: root/host/utils
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2017-01-05 09:32:23 -0800
committerMartin Braun <martin.braun@ettus.com>2017-01-05 09:32:23 -0800
commit75f3270d0cc199bf0665bc1612fe8e1b020aee1f (patch)
treee5960aaf348a7e8ad11e5385eea944165228c9af /host/utils
parent01181d2fa6270fbbbc34ff4cb1e75b44cb7f9e1b (diff)
parentf86f209b3370be54ec0870186ab1b9d8988736eb (diff)
downloaduhd-75f3270d0cc199bf0665bc1612fe8e1b020aee1f.tar.gz
uhd-75f3270d0cc199bf0665bc1612fe8e1b020aee1f.tar.bz2
uhd-75f3270d0cc199bf0665bc1612fe8e1b020aee1f.zip
Merge branch 'maint'
Diffstat (limited to 'host/utils')
-rw-r--r--host/utils/uhd_images_downloader.py.in6
1 files changed, 5 insertions, 1 deletions
diff --git a/host/utils/uhd_images_downloader.py.in b/host/utils/uhd_images_downloader.py.in
index 7a3ff8ddf..593f7759f 100644
--- a/host/utils/uhd_images_downloader.py.in
+++ b/host/utils/uhd_images_downloader.py.in
@@ -91,8 +91,12 @@ class uhd_images_downloader():
filesize_dl += len(buff)
if print_progress:
status = r"%05d kB / %05d kB (%03d%%)" % (int(math.ceil(filesize_dl/1000.)), int(math.ceil(filesize/1000.)), int(math.ceil(filesize_dl*100.)/filesize))
- status += chr(8)*(len(status)+1)
+ if os.name == "nt":
+ status += chr(8)*(len(status)+1)
+ else:
+ sys.stdout.write("\x1b[2K\r") #Clear previos line
sys.stdout.write(status)
+ sys.stdout.flush()
if print_progress:
print('')
return (filesize, filesize_dl)