Skip to content

Put network calls in try/except block - #757

Merged
TG1999 merged 2 commits into
aboutcode-org:mainfrom
TG1999:fix_redhat_importer
May 26, 2022
Merged

TG1999 merged 2 commits into
aboutcode-org:mainfrom
TG1999:fix_redhat_importer

Conversation

@TG1999

@TG1999 TG1999 commented May 24, 2022

Copy link
Copy Markdown
Contributor

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

TG1999 commented May 24, 2022

Copy link
Copy Markdown
Contributor Author
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

@pombredanne pombredanne left a comment

Copy link
Copy Markdown
Member

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

Comment thread vulnerabilities/importers/redhat.py Outdated
Comment thread vulnerabilities/importers/redhat.py
@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