From 41b9f36fb74d765eff89da5ff8055becfc42c74c Mon Sep 17 00:00:00 2001 From: j Date: Wed, 20 Nov 2019 13:55:59 +0100 Subject: [PATCH] year might not be int --- scripts/poster.erg.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/poster.erg.py b/scripts/poster.erg.py index ede4d19..cd63d5f 100755 --- a/scripts/poster.erg.py +++ b/scripts/poster.erg.py @@ -53,7 +53,10 @@ def render_poster(data, poster): font_size_small = 32 font_size_large = 48 font_file = os.path.join(static_root, 'MontserratBold.ttf') - hue = int(year) % 100 * 3.6 + try: + hue = int(year) % 100 * 3.6 + except: + hue = int(0) % 100 * 3.6 image_color = getRGB([hue, 1, 0.2]) background_color = getRGB([hue, 1, 0.4]) foreground_color = getRGB([hue, 1, 0.8])