summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2012-08-26 00:26:52 +0200
committerJon Bergli Heier <snakebite@jvnv.net>2012-08-26 00:26:52 +0200
commit716dedfe638c414af8619ec76b860644b9b6e43c (patch)
tree4b7129f6f01199efe98b906a0adafe3acdf702ce
parent59d69707083a9050fcaf77402f86eb1665277f10 (diff)
wolframalpha: Ignore empty plaintext.
-rw-r--r--modules/wolframalpha.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/wolframalpha.py b/modules/wolframalpha.py
index 910698f..f13cdcb 100644
--- a/modules/wolframalpha.py
+++ b/modules/wolframalpha.py
@@ -39,7 +39,7 @@ class Module(object):
for pod in xml.findall('pod'):
#if pod.attrib['id'] == 'Result':
result = pod.find('subpod/plaintext')
- if result is not None:
+ if result is not None and result.text is not None:
text = result.text
text = whitespace_re.sub(' ', text)
results.append('\002%s\002: %s' % (pod.attrib['title'], text))