Skip to content

core/config: Fix ConfigError missing argument if toml is missing#845

Merged
ericwb merged 1 commit into
PyCQA:mainfrom
Holzhaus:fix-configerror-missing-arg
Mar 4, 2022
Merged

core/config: Fix ConfigError missing argument if toml is missing#845
ericwb merged 1 commit into
PyCQA:mainfrom
Holzhaus:fix-configerror-missing-arg

Conversation

@Holzhaus
Copy link
Copy Markdown
Contributor

@Holzhaus Holzhaus commented Mar 3, 2022

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'

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'
@Holzhaus Holzhaus force-pushed the fix-configerror-missing-arg branch from 58b6752 to cecfe37 Compare March 3, 2022 20:57
Copy link
Copy Markdown
Member

@ericwb ericwb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ericwb ericwb merged commit 71bc67c into PyCQA:main Mar 4, 2022
This was referenced Mar 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants