Skip to content

Commit

Permalink
Fix log level and wording (#831)
Browse files Browse the repository at this point in the history
Fix log level and wording

Reviewed-by: Maja Massarini
  • Loading branch information
softwarefactory-project-zuul[bot] authored Dec 22, 2023
2 parents 99a8026 + 8a3e14b commit fbf35d3
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 fbf35d3

Please sign in to comment.