mirror of
https://github.com/certbot/certbot.git
synced 2026-07-26 07:39:52 +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):
|
||||
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user