From bda6590fabf2fb41e91e1e92a44362b3e7515a6f Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 19 Sep 2012 20:08:00 -0400 Subject: [PATCH] storage: make [course] parameters optional (e.g. no assistants). --- pygrader/storage.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 = [] -- 2.26.2