Commit 3f32e5bb by Calen Pennington

Fix minor issue with an incomplete carry through of a name change

parent 3f545511
...@@ -24,10 +24,10 @@ def only_one(lst, default="", process=lambda x: x): ...@@ -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 If lst has a single element, applies process to that element and returns it
Otherwise, raises an exeception Otherwise, raises an exeception
""" """
if len(l) == 0: if len(lst) == 0:
return default return default
elif len(l) == 1: elif len(lst) == 1:
return process(l[0]) return process(lst[0])
else: else:
raise Exception('Malformed XML') raise Exception('Malformed XML')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment