Commits

anatoly techtonik committed 1d55617

limit width of progress bar to 100 chars

  • Participants
  • Parent commits b9794ae

Comments (0)

Files changed (3)

 =========
 0.7 (2011-03-01)
  * compatibility fix for Python 2.5
+ * limit width of progress bar to 100 chars
 
 0.6 (2010-04-24)
  * it detects console width on POSIX
 =========
 0.7 (2011-03-01)
  * compatibility fix for Python 2.5
+ * limit width of progress bar to 100 chars
 
 0.6 (2010-04-24)
  * it detects console width on POSIX
     :param block_size: in bytes
     :param total_size: in bytes, can be -1 if server doesn't return it
     """
-    width = get_console_width()
+    width = min(100, get_console_width())
     size_width = len("%s" % total_size)
     size_field_width = size_width*2 + 3 # 'xxxx / yyyy'
     min_bar_width = 3 # [.]