Skip to content

Commit

Permalink
Improved readability of utils.datetime_safe._findall().
Browse files Browse the repository at this point in the history
  • Loading branch information
srinivasreddy authored and timgraham committed Jan 8, 2018
1 parent 47a99d7 commit acd3baf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions django/utils/datetime_safe.py
Expand Up @@ -61,12 +61,12 @@ def _findall(text, substr):
# Also finds overlaps
sites = []
i = 0
while 1:
j = text.find(substr, i)
if j == -1:
while True:
i = text.find(substr, i)
if i == -1:
break
sites.append(j)
i = j + 1
sites.append(i)
i += 1
return sites


Expand Down

0 comments on commit acd3baf

Please sign in to comment.