diff options
author | Johannes Löthberg <johannes@kyriasis.com> | 2016-11-15 13:50:20 +0100 |
---|---|---|
committer | Johannes Löthberg <johannes@kyriasis.com> | 2016-11-15 13:50:20 +0100 |
commit | 46bad35efce8817fd9fae0450e416f820ff742ce (patch) | |
tree | 9fa4cc4e460c34ce358acab323d4860b6cdf401e /scripts | |
parent | 294fd044deff8e727a29847712a25149c1545063 (diff) | |
download | kyblo-46bad35efce8817fd9fae0450e416f820ff742ce.tar.xz |
Simplify older/newer logic
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build.py | 9 |
1 files changed, 2 insertions, 7 deletions
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: |