From ec9af33df561c58bb4da70bec11a9b9d9c462ee5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Porte=C5=A1?= Date: Mon, 27 Jun 2022 10:54:50 +0200 Subject: [PATCH] Fix arguments to LOG.error Pass correct number of arguments to match the `%s` placeholders. --- bandit/core/manager.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bandit/core/manager.py b/bandit/core/manager.py index fe20a2dc6..e82f67165 100644 --- a/bandit/core/manager.py +++ b/bandit/core/manager.py @@ -331,12 +331,12 @@ def _parse_file(self, fname, fdata, new_files_list): new_files_list.remove(fname) except Exception as e: LOG.error( - "Exception occurred when executing tests against %s.", - fname, - fname, + "Exception occurred when executing tests against %s.", fname ) if not LOG.isEnabledFor(logging.DEBUG): - LOG.error('Run "bandit --debug %s" to see the full traceback.') + LOG.error( + 'Run "bandit --debug %s" to see the full traceback.', fname + ) self.skipped.append((fname, "exception while scanning file")) new_files_list.remove(fname)