From: Oleg Broytman Date: Tue, 1 Aug 2023 16:55:28 +0000 (+0300) Subject: Feat(debian/sa-merge-all.py): Update to `python3` X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=3d695378e15bf0b773bd243e5f4fa8836414e85d;p=ansible.git Feat(debian/sa-merge-all.py): Update to `python3` Fix a bug found by `flake8`: there were 4 placeholders but only 3 arguments. --- diff --git a/playbooks/debian/sa-merge-all.py b/playbooks/debian/sa-merge-all.py index c129111..2328c0e 100755 --- a/playbooks/debian/sa-merge-all.py +++ b/playbooks/debian/sa-merge-all.py @@ -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}