mirror of
https://github.com/certbot/certbot.git
synced 2026-04-15 22:20:28 -04:00
Make spaced list handle an insert past the end of the list
This commit is contained in:
parent
f98470d4a0
commit
4eb38fe167
1 changed files with 2 additions and 1 deletions
|
|
@ -215,7 +215,8 @@ class UnspacedList(list):
|
|||
|
||||
def insert(self, i, x):
|
||||
item, spaced_item = self._coerce(x)
|
||||
self.spaced.insert(self._spaced_position(i), spaced_item)
|
||||
self.spaced.insert(self._spaced_position(i) if i < len(self) else i,
|
||||
spaced_item)
|
||||
list.insert(self, i, item)
|
||||
self.dirty = True
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue