Skip to content

Commit

Permalink
Fix log level and wording
Browse files Browse the repository at this point in the history
Signed-off-by: Nikola Forró <[email protected]>
  • Loading branch information
nforro committed Dec 22, 2023
1 parent 99a8026 commit 8a3e14b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions ogr/services/pagure/pull_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def get_files_diff(
retries: Number of extra attempts.
wait_seconds: Delay between attempts.
"""
attempt = 0
attempt = 1
while True:
try:
return project._call_project_api(
Expand All @@ -224,14 +224,14 @@ def get_files_diff(
except PagureAPIException as ex: # noqa PERF203
if "No statistics" in ex.pagure_error:
# this may be a race condition, try once more
logger.error(
f"While retrieving PR diffstats Pagure returned ENOPRSTATS. \n{ex}",
logger.info(
f"While retrieving PR diffstats Pagure returned ENOPRSTATS.\n{ex}",
)
if attempt < retries:
logger.error(
f"Trying again; attempt={attempt} after {wait_seconds}seconds",
)
if attempt <= retries:
attempt += 1
logger.info(
f"Trying again; attempt={attempt} after {wait_seconds} seconds",
)
sleep(wait_seconds)
continue
raise ex
Expand Down

0 comments on commit 8a3e14b

Please sign in to comment.