Skip to content

Commit

Permalink
retag: Properly display the final count
Browse files Browse the repository at this point in the history
i == count cannot happen in the loop as i will vary from 0 to count - 1.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
  • Loading branch information
Damien Lespiau committed Nov 7, 2015
1 parent b3439d9 commit 646c252
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion patchwork/management/commands/retag.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ def handle(self, *args, **options):

for i, patch in enumerate(query.iterator()):
patch.refresh_tag_counts()
if (i % 10) == 0 or i == count:
if (i % 10) == 0:
sys.stdout.write('%06d/%06d\r' % (i, count))
sys.stdout.flush()
sys.stdout.write('%06d/%06d\r' % (count, count))
sys.stdout.write('\ndone\n')

0 comments on commit 646c252

Please sign in to comment.