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

Raise specific exception #128

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Raise specific exception #128

wants to merge 1 commit into from

Conversation

Mytak
Copy link

@Mytak Mytak commented Nov 23, 2024

Description

In case of an HTTPError or a Timeout the general exception of type "Exception" is raised.

However, using "Exception" causes pylint tests to fail with:

"W0718: Catching too general exception Exception (broad-exception-caught"

This can be corrected by adding a specific exception in util.py

Type of change

  • Code styling or code optimize

What you did

Added a specific exception for HTTPError and Timeout

The general Exception causes pylint tests to fail:

W0718: Catching too general exception Exception (broad-exception-caught

This can be corrected by using a specific exception
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.

1 participant