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

Improve log message 'skip incident' #166

Merged
merged 1 commit into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion openqabot/loader/repohash.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def get_max_revision(
HTTPError,
RetryError,
): # for now, use logger.exception to determine possible exceptions in this code :D
log.info("%s not found -- skip incident" % url)
log.info("%s not found -- skipping incident" % url)
raise NoRepoFoundError
except Exception as e:
log.exception(e)
Expand Down
6 changes: 3 additions & 3 deletions tests/test_repohash.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def test_get_max_revison_connectionerror(caplog):

assert (
caplog.records[0].msg
== "http://download.suse.de/ibs/SUSE:/Maintenance:/12345/SUSE_Updates_SLED_15SP3_x86_64/repodata/repomd.xml not found -- skip incident"
== "http://download.suse.de/ibs/SUSE:/Maintenance:/12345/SUSE_Updates_SLED_15SP3_x86_64/repodata/repomd.xml not found -- skipping incident"
)


Expand All @@ -84,7 +84,7 @@ def test_get_max_revison_httperror(caplog):

assert (
caplog.records[0].msg
== "http://download.suse.de/ibs/SUSE:/Maintenance:/12345/SUSE_Updates_SLED_15SP3_x86_64/repodata/repomd.xml not found -- skip incident"
== "http://download.suse.de/ibs/SUSE:/Maintenance:/12345/SUSE_Updates_SLED_15SP3_x86_64/repodata/repomd.xml not found -- skipping incident"
)


Expand All @@ -98,7 +98,7 @@ def test_get_max_revison_xmlerror(caplog):

assert (
caplog.records[0].msg
== "http://download.suse.de/ibs/SUSE:/Maintenance:/12345/SUSE_Updates_SLED_15SP3_x86_64/repodata/repomd.xml not found -- skip incident"
== "http://download.suse.de/ibs/SUSE:/Maintenance:/12345/SUSE_Updates_SLED_15SP3_x86_64/repodata/repomd.xml not found -- skipping incident"
)


Expand Down
Loading