From 3d695378e15bf0b773bd243e5f4fa8836414e85d Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Tue, 1 Aug 2023 19:55:28 +0300 Subject: [PATCH] Feat(debian/sa-merge-all.py): Update to `python3` Fix a bug found by `flake8`: there were 4 placeholders but only 3 arguments. --- playbooks/debian/sa-merge-all.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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} -- 2.39.2