]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
retag: Remove excess line endings
authorDamien Lespiau <damien.lespiau@intel.com>
Sat, 7 Nov 2015 16:49:25 +0000 (16:49 +0000)
committerStephen Finucane <stephen.finucane@intel.com>
Thu, 12 Nov 2015 04:05:14 +0000 (04:05 +0000)
In:

    commit 544b8bbcc7ec80d94c96f181886c51b177530a95
    Author: Stephen Finucane <stephen.finucane@intel.com>
    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 <damien.lespiau@intel.com>
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
patchwork/management/commands/retag.py

index f92648b2924664019206ce0157fa4ee658d6a1bd..7207f58df8e9269ad4a836661b74e6d630597874 100644 (file)
@@ -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')