From f98470d4a05620e09eea6992ccd6deda15ffacbf Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Tue, 26 Jul 2016 17:01:24 -0700 Subject: [PATCH] Revert "UnspacedList._spaced_position: support the slice at the end fo the list" This reverts commit 85d9ab4d5c2d2afd3c36229a771f77e4536853cf. --- certbot-nginx/certbot_nginx/nginxparser.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/certbot-nginx/certbot_nginx/nginxparser.py b/certbot-nginx/certbot_nginx/nginxparser.py index a4d4a452f..1859777d8 100644 --- a/certbot-nginx/certbot_nginx/nginxparser.py +++ b/certbot-nginx/certbot_nginx/nginxparser.py @@ -279,9 +279,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