lpschedule-generator

libreplanet schedule generator - ricketyspace.net/lpschedule-generator
git clone git://git.ricketyspace.net/lpschedule-generator.git
Log | Files | Refs

commit 19c1ac03e916561f2458312e5c9251b0b9eab075
parent 2378aafd0ababffbefc21cfde40f1aadc1d28909
Author: rsiddharth <rsd@gnu.org>
Date:   Sat, 19 Dec 2015 18:23:21 -0500

updated lps_gen.RenderHTML

When template is not found, instead of returning, it calls sys.exit(1).

Diffstat:
lps_gen.py | 2+-
tests/test_lps_gen.py | 1+
2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/lps_gen.py b/lps_gen.py @@ -160,7 +160,7 @@ def RenderHTML(lps_dict, year): template = env.get_template(template_name) except TemplateNotFound as e: print "Template %s not found." % template_name - return + exit(1) lps_html = template.render(schedule=lps_dict) diff --git a/tests/test_lps_gen.py b/tests/test_lps_gen.py @@ -163,6 +163,7 @@ class TestLpsGen(object): print lps_html + @raises(SystemExit) def test_RenderHTML_invalid_year(self): """Testing `RenderHTML` function - with invalid year """