Commit 888d25ee authored by PidgeyL's avatar PidgeyL
Browse files

bugfix empty collections

parent dc86fe0e
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@ def progressbar(it, prefix="Preparing ", size=50):
    count = len(it)

    def _show(_i):
        if count != 0:
            x = int(size * _i / count)
            sys.stdout.write("%s[%s%s] %i/%i\r" % (prefix, "#" * x, " " * (size - x), _i, count))
            sys.stdout.flush()