mirror of
https://github.com/kennethreitz/clint.git
synced 2026-06-05 23:00:18 +00:00
Merge pull request #102 from daveFNbuck/buck_fix_mills
Fixes progress.mill display when every is greater than 1
This commit is contained in:
@@ -97,10 +97,10 @@ def mill(it, label='', hide=HIDE_DEFAULT, expected_size=None, every=1):
|
||||
"""Progress iterator. Prints a mill while iterating over the items."""
|
||||
|
||||
def _mill_char(_i):
|
||||
if _i == 100:
|
||||
if _i >= count:
|
||||
return ' '
|
||||
else:
|
||||
return MILL_CHARS[_i % len(MILL_CHARS)]
|
||||
return MILL_CHARS[(_i / every) % len(MILL_CHARS)]
|
||||
|
||||
def _show(_i):
|
||||
if not hide:
|
||||
|
||||
Reference in New Issue
Block a user