mirror of
https://github.com/certbot/certbot.git
synced 2026-07-27 16:19:11 +02:00
Merge remote-tracking branch 'origin/no-conflicting-declarations3' into no-conflicting-declarations3
This commit is contained in:
@@ -227,7 +227,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
|
||||
|
||||
@@ -291,9 +292,6 @@ class UnspacedList(list):
|
||||
# Normalize indexes like list[-1] etc, and save the result
|
||||
if idx < 0:
|
||||
idx = len(self) + idx
|
||||
if idx == len(self):
|
||||
# not an index, but the slice at the end of the list
|
||||
return len(self.spaced)
|
||||
if not 0 <= idx < len(self):
|
||||
raise IndexError("list index out of range")
|
||||
idx0 = idx
|
||||
|
||||
@@ -235,7 +235,7 @@ class NginxConfiguratorTest(util.NginxTest):
|
||||
['index', 'index.html index.htm']]],
|
||||
['listen', '5001 ssl'],
|
||||
['ssl_certificate', '/etc/nginx/fullchain.pem'],
|
||||
['ssl_certificate_key', '/etc/nginx/key.pem']]+
|
||||
['ssl_certificate_key', '/etc/nginx/key.pem']] +
|
||||
util.filter_comments(self.config.parser.loc["ssl_options"])
|
||||
],
|
||||
2))
|
||||
|
||||
Reference in New Issue
Block a user