mirror of
https://github.com/certbot/certbot.git
synced 2026-07-27 08:09:10 +02:00
Be more explicit about range policing
(rather than doing it in some roundabout crazy way)
This commit is contained in:
@@ -239,6 +239,8 @@ class UnspacedList(list):
|
||||
# Normalize indexes like list[-1] etc, and save the result
|
||||
if idx < 0:
|
||||
idx = len(self) + idx
|
||||
if not 0 <= idx < len(self):
|
||||
raise IndexError("list index out of range")
|
||||
idx0 = idx
|
||||
# Count the number of spaces in the spaced list before idx in the unspaced one
|
||||
while idx != -1:
|
||||
|
||||
Reference in New Issue
Block a user