From 46bad35efce8817fd9fae0450e416f820ff742ce Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Tue, 15 Nov 2016 13:50:20 +0100 Subject: Simplify older/newer logic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Johannes Löthberg --- scripts/build.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'scripts') diff --git a/scripts/build.py b/scripts/build.py index 03b83b3..2b6055d 100755 --- a/scripts/build.py +++ b/scripts/build.py @@ -81,13 +81,8 @@ if __name__ == '__main__': build_entry(jenv, entry) for index, entry in enumerate(published): - older = None - newer = None - if index > 0: - older = published[index-1] - if index < len(published) - 1: - newer = published[index+1] - + older = published[index:index-1] + newer = published[index:index+1] build_entry(jenv, entry, older, newer) if len(published) > 1: -- cgit v1.2.3-70-g09d2