Make type check for self.code a little more robust, give default val for mmlans so it's never undefined

This commit is contained in:
David Ormsbee
2013-02-10 19:03:25 -05:00
parent f94df6e3f5
commit fb1e7f3dc1
2 changed files with 2 additions and 3 deletions

View File

@@ -238,8 +238,7 @@ def symmath_check(expect, ans, dynamath=None, options=None, debug=None, xml=None
###### PMathML input ######
# convert mathml answer to formula
try:
if dynamath:
mmlans = dynamath[0]
mmlans = dynamath[0] if dynamath else None
except Exception, err:
mmlans = None
if not mmlans: