quatuorbellefeuille.com

Content, build scripts and admin scripts for the Bellefeuille Quartet website.
git clone https://git.kevinlegouguec.net/quatuorbellefeuille.com
Log | Files | Refs

commit 368daac4cd6a33352d92eddfe656e2f357275c8b
parent c78f1b08f451027ffaf3666710433442fdb3031e
Author: Kévin Le Gouguec <kevin.legouguec@gmail.com>
Date:   Sun, 13 Feb 2022 13:55:32 +0100

DRY up the code

Diffstat:
Mbuild-concerts.py | 7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/build-concerts.py b/build-concerts.py @@ -128,11 +128,14 @@ def read_concerts(filename): def split_concerts(concerts, threshold): + cutoff = len(concerts) + for i, c in enumerate(concerts): if c.time > threshold: - return reversed(concerts[:i]), concerts[i:] + cutoff = i + break - return reversed(concerts), () + return reversed(concerts[:cutoff]), concerts[cutoff:] LOCALIZED_TEXT = {