mirror of
https://github.com/certbot/certbot.git
synced 2026-08-02 00:22:28 +02:00
Make spaced list handle an insert past the end of the list
This commit is contained in:
@@ -215,7 +215,8 @@ class UnspacedList(list):
|
|||||||
|
|
||||||
def insert(self, i, x):
|
def insert(self, i, x):
|
||||||
item, spaced_item = self._coerce(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)
|
list.insert(self, i, item)
|
||||||
self.dirty = True
|
self.dirty = True
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user