retires: use range(1, retries)
Bug #1742249 reported by
Joshua Powers
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
git-ubuntu |
Confirmed
|
Low
|
Nish Aravamudan |
Bug Description
Trying to debug code that is in a retry loop is not straightforward as it is. Having to see variables constantly add 1 to them, because range starts at 0 rather than 1 is unclear. Can I suggest replacing code like the following from build.py:
for i in range(retries+1):
...
"(attempt %d/%d)", i+1, retries+1,
...
if i < retries:
with the following:
for i in range(1, retries):
...
"(attempt %d/%d)", i, retries,
...
if i <= retries:
Changed in usd-importer: | |
status: | New → Confirmed |
assignee: | nobody → Nish Aravamudan (nacc) |
milestone: | none → future |
importance: | Undecided → Low |
tags: | added: quality |
To post a comment you must log in.