Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redundant message to use --debug #883

Closed
ericwb opened this issue Apr 15, 2022 · 0 comments · Fixed by #913
Closed

Redundant message to use --debug #883

ericwb opened this issue Apr 15, 2022 · 0 comments · Fixed by #913
Labels
bug Something isn't working

Comments

@ericwb
Copy link
Member

ericwb commented Apr 15, 2022

Describe the bug

If you run Bandit with the --debug flag when you have a traceback, you'll notice in the output, that Bandit still recommends running bandit with the --debug flag even though you already have.

Reproduction steps

1. Run the steps in https://github.com/PyCQA/bandit/issues/882
2. It instructs to run `bandit --debug pocfile.py`
3. Notice in the console output the following redundant message:

[manager]	ERROR	Exception occurred when executing tests against pocfile.py. Run "bandit --debug pocfile.py" to see the full traceback.


### Expected behavior

If running in debug mode, it shouldn't tell the user to run it again.

### Bandit version

1.7.4 (Default)

### Python version

3.10 (Default)

### Additional context

_No response_
@ericwb ericwb added the bug Something isn't working label Apr 15, 2022
ericwb added a commit that referenced this issue Jun 25, 2022
Only print the message to use "--debug" if debug logging not already
turned on.

Closes #883

Signed-off-by: Eric Brown <eric_wade_brown@yahoo.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant