From: W. Trevor King Date: Thu, 20 Sep 2012 00:08:00 +0000 (-0400) Subject: storage: make [course] parameters optional (e.g. no assistants). X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=bda6590fabf2fb41e91e1e92a44362b3e7515a6f;p=pygrader.git storage: make [course] parameters optional (e.g. no assistants). --- diff --git a/pygrader/storage.py b/pygrader/storage.py index a5516e9..51fcadd 100644 --- a/pygrader/storage.py +++ b/pygrader/storage.py @@ -64,7 +64,8 @@ def load_course(basedir): names = {'robot': [config.get('course', 'robot').strip()]} for option in ['assignments', 'professors', 'assistants', 'students']: names[option] = [ - a.strip() for a in config.get('course', option).split(',')] + a.strip() for a in + config.get('course', option, fallback='').split(',')] while '' in names[option]: names[option].remove('') assignments = []