From 9085406aadd8b084f50a80a04af36236279e90b0 Mon Sep 17 00:00:00 2001 From: staticsafe Date: Thu, 5 Jan 2012 13:32:08 -0500 Subject: [PATCH] hopefully this fixes it --- envsetup.py | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/envsetup.py b/envsetup.py index 501c57a..851752f 100644 --- a/envsetup.py +++ b/envsetup.py @@ -37,19 +37,16 @@ def urldownload(confurl = ""): block_sz = 8192 while True: - buffer = u.read(block_sz) - if not buffer: - break - - file_size_dl += len(buffer) - f.write(buffer) - status = r"%10d [%3.2f%%]" % (file_size_dl, file_size_dl * 100. / file_size) - status = status + chr(8)*(len(status)+1) - print status, - + buffer = u.read(block_sz) + if not buffer: + break + file_size_dl += len(buffer) + f.write(buffer) + status = r"%10d [%3.2f%%]" % (file_size_dl), file_size_dl * 100. / file_size) + status = status + chr(8)*(len(status)+1) + print status, f.close() - def confdownload(): urldownload(confurl = vimrcurl) urldownload(confurl = zshrcurl)