From 3f32e5bb3cf3e26260653c114a35351d0d153a3e Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Thu, 7 Jun 2012 16:36:39 -0400 Subject: [PATCH] Fix minor issue with an incomplete carry through of a name change --- common/lib/xmodule/capa_module.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/lib/xmodule/capa_module.py b/common/lib/xmodule/capa_module.py index a4140c7489..ad3e88207b 100644 --- a/common/lib/xmodule/capa_module.py +++ b/common/lib/xmodule/capa_module.py @@ -24,10 +24,10 @@ def only_one(lst, default="", process=lambda x: x): If lst has a single element, applies process to that element and returns it Otherwise, raises an exeception """ - if len(l) == 0: + if len(lst) == 0: return default - elif len(l) == 1: - return process(l[0]) + elif len(lst) == 1: + return process(lst[0]) else: raise Exception('Malformed XML')