Skip to content

Commit

Permalink
pylint module error 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Mael-J committed Feb 3, 2024
1 parent f968ddd commit 10ac68f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mstarpy/error.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""module to raise error"""

def not_200_response(url,response):
"""
This function raise a ConnectionError if the status code a requests is not 200.
Expand All @@ -12,7 +14,7 @@ def no_site_error(code, name, country, site):
"""
This function raise a ValueError if the selected country is "us" or a site is not selected.
"""

if not site or country == 'us':
if country:
raise ValueError(f"The funds of the country {country} cannot be scraped.")
Expand Down

0 comments on commit 10ac68f

Please sign in to comment.