From: Damien Lespiau Date: Sat, 7 Nov 2015 16:49:25 +0000 (+0000) Subject: retag: Remove excess line endings X-Git-Tag: v1.1.0~119 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=87353a4204d0f2a79c500a7ae420c5d1c3aab6e6;p=thirdparty%2Fpatchwork.git retag: Remove excess line endings In: commit 544b8bbcc7ec80d94c96f181886c51b177530a95 Author: Stephen Finucane Date: Fri Aug 21 15:32:17 2015 +0100 trivial: Resolve PEP8 issues with 'management' I noted that it wasn't all trivial changes. And indeed using the stdin/stdout wrappers change the intended behaviour by adding a new line. The stderr wrapper also colors the line in red. Changed the last message to be printed on stdout, seems more logical. Signed-off-by: Damien Lespiau Signed-off-by: Stephen Finucane --- diff --git a/patchwork/management/commands/retag.py b/patchwork/management/commands/retag.py index f92648b2..7207f58d 100644 --- a/patchwork/management/commands/retag.py +++ b/patchwork/management/commands/retag.py @@ -38,6 +38,6 @@ class Command(BaseCommand): for i, patch in enumerate(query.iterator()): patch.refresh_tag_counts() if (i % 10) == 0 or i == count: - self.stdout.write('%06d/%06d\r' % (i, count)) + self.stdout.write('%06d/%06d\r' % (i, count), ending='') self.stdout.flush() - self.stderr.write('\ndone\n') + self.stdout.write('\ndone')