]> git.phdru.name Git - ansible.git/commitdiff
Feat(debian/sa-merge-all.py): Update to `python3`
authorOleg Broytman <phd@phdru.name>
Tue, 1 Aug 2023 16:55:28 +0000 (19:55 +0300)
committerOleg Broytman <phd@phdru.name>
Tue, 1 Aug 2023 16:57:26 +0000 (19:57 +0300)
Fix a bug found by `flake8`:
there were 4 placeholders but only 3 arguments.

playbooks/debian/sa-merge-all.py

index c12911144d61a2e20cb7ee97ab3fb2deed6cf5bc..2328c0ed8af50804091d3a742a3b344cfbeb2879 100755 (executable)
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
 
 import argparse
 
@@ -32,7 +32,7 @@ if __name__ == '__main__':
                 close_all()
                 raise ValueError(
                         'Bad v-tag in file %s line %s: unknown v-tag %s, '
-                        'expected "v", got %r' % (fname, counter_line, v))
+                        'expected "v"' % (fname, counter_line, v))
             if tag == 'num_spam':
                 try:
                     counters['spam'][fname] = int(counter)
@@ -49,7 +49,7 @@ if __name__ == '__main__':
                 close_all()
                 raise ValueError(
                         'Bad tag in file %s line %s: unknown tag %s, '
-                        'expected "num_spam" or "num_nonspam", got %r' % (
+                        'expected "num_spam" or "num_nonspam"' % (
                             fname, counter_line, tag))
 
     counters_total = {'spam': 0, 'nonspam': 0}