Added error logging for unparsable answers.

This commit is contained in:
Felix Sun
2013-07-09 13:26:02 -04:00
parent b68c117854
commit 3418feba52

View File

@@ -144,6 +144,7 @@ class CrowdsourceHinterModule(CrowdsourceHinterFields, XModule):
answer = self.capa_answer_to_str(get)
except ValueError:
# Sometimes, we get an answer that's just not parsable. Do nothing.
log.exception('Answer not parsable: ' + str(get))
return
# Look for a hint to give.
# Make a local copy of self.hints - this means we only need to do one json unpacking.