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

Put network calls in try/except block #757

Merged
merged 2 commits into from
May 26, 2022

Conversation

TG1999
Copy link
Contributor

@TG1999 TG1999 commented May 24, 2022

Signed-off-by: Tushar Goel tushar.goel.dav@gmail.com

@TG1999 TG1999 force-pushed the fix_redhat_importer branch from 25b4080 to 83473a7 Compare May 24, 2022 22:06
@TG1999
Copy link
Contributor Author

TG1999 commented May 24, 2022

raise RetryError(e, request=request)
requests.exceptions.RetryError: HTTPSConnectionPool(host='access.redhat.com', port=443): Max retries exceeded with url: /hydra/rest/securitydata/cvrf/RHSA-2015:2077.json (Caused by ResponseError('too many 503 error responses'))
Failed to run importer vulnerabilities.importers.redhat.RedhatImporter. Continuing...
CommandError: 1 failed!: vulnerabilities.importers.redhat.RedhatImporter

Got this error while running redhat importer

@TG1999 TG1999 force-pushed the fix_redhat_importer branch 3 times, most recently from 68e403a to a288752 Compare May 24, 2022 22:40
Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
@TG1999 TG1999 force-pushed the fix_redhat_importer branch from a288752 to 2b41cdc Compare May 24, 2022 23:00
Copy link
Member

@pombredanne pombredanne left a comment

Choose a reason for hiding this comment

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

Thanks! I just added some comments on an opportunity to streamline the code

vulnerabilities/importers/redhat.py Outdated Show resolved Hide resolved
vulnerabilities/importers/redhat.py Show resolved Hide resolved
@TG1999 TG1999 force-pushed the fix_redhat_importer branch 3 times, most recently from 6986e0a to ec8b62e Compare May 25, 2022 16:07
Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
@TG1999 TG1999 force-pushed the fix_redhat_importer branch from ec8b62e to 31ba98a Compare May 25, 2022 16:14
@TG1999 TG1999 merged commit d7627ef into aboutcode-org:main May 26, 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