Skip to content

Commit 71bc67c

Browse files
authored
core/config: Fix ConfigError missing argument if toml is missing (#845)
Fixes the following error: Traceback (most recent call last): File "bin/bandit", line 8, in <module> sys.exit(main()) File "lib/python3.10/site-packages/bandit/cli/main.py", line 455, in main b_conf = b_config.BanditConfig(config_file=args.config_file) File "lib/python3.10/site-packages/bandit/core/config.py", line 45, in __init__ raise utils.ConfigError( TypeError: ConfigError.__init__() missing 1 required positional argument: 'config_file'
1 parent fcde9b5 commit 71bc67c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

bandit/core/config.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ def __init__(self, config_file=None):
4343
if config_file.endswith(".toml"):
4444
if toml is None:
4545
raise utils.ConfigError(
46-
"toml parser not available, reinstall with toml extra"
46+
"toml parser not available, reinstall with toml extra",
47+
config_file,
4748
)
4849

4950
try:

0 commit comments

Comments
 (0)