mirror of
https://github.com/certbot/certbot.git
synced 2026-08-03 03:32:13 +02:00
Try simplifying handling of spacey sublists
- this was causing test failures but they may all have been fixed by other changes...
This commit is contained in:
@@ -172,12 +172,7 @@ class UnspacedList(list):
|
|||||||
for i, entry in reversed(list(enumerate(self))):
|
for i, entry in reversed(list(enumerate(self))):
|
||||||
if isinstance(entry, list):
|
if isinstance(entry, list):
|
||||||
sublist = UnspacedList(entry)
|
sublist = UnspacedList(entry)
|
||||||
if sublist != [] or sublist.spaced == []:
|
list.__setitem__(self, i, sublist)
|
||||||
list.__setitem__(self, i, sublist)
|
|
||||||
else:
|
|
||||||
# if a sublist is exclusively spacey entries, it might
|
|
||||||
# choke the high level parser, so make it disappear
|
|
||||||
list.__delitem__(self, i)
|
|
||||||
self.spaced[i] = sublist.spaced
|
self.spaced[i] = sublist.spaced
|
||||||
elif spacey(entry):
|
elif spacey(entry):
|
||||||
# don't delete comments
|
# don't delete comments
|
||||||
|
|||||||
Reference in New Issue
Block a user