-
Notifications
You must be signed in to change notification settings - Fork 112
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
EPA Air Data Modification for Automation #1073
Conversation
filename: The local filename to save the downloaded ZIP file. | ||
""" | ||
|
||
response = requests.get(url) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add try-catch block for this code.
|
||
response = requests.get(url) | ||
|
||
if response.status_code == 200: # Check for successful response (200 OK) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add retry option if response.status_code is not 200
else: | ||
logging.error(f'Error downloading file: {response.status_code}') | ||
|
||
|
||
def request_and_write_csv(csv_file_path, filename): | ||
response = requests.get( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add try catch block and retry option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please work on the comments.
No description provided.