diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2012-08-26 00:26:52 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2012-08-26 00:26:52 +0200 |
commit | 716dedfe638c414af8619ec76b860644b9b6e43c (patch) | |
tree | 4b7129f6f01199efe98b906a0adafe3acdf702ce /modules | |
parent | 59d69707083a9050fcaf77402f86eb1665277f10 (diff) |
wolframalpha: Ignore empty plaintext.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/wolframalpha.py | 2 |
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)) |