diff options
author | Andrej Shadura <andrewsh@debian.org> | 2018-04-30 11:06:34 +0200 |
---|---|---|
committer | Andrej Shadura <andrewsh@debian.org> | 2018-04-30 11:06:34 +0200 |
commit | 1dc39ba3b5a6d64a394e77aa25e428874ca1b04f (patch) | |
tree | 58046b7a29650f8c57510b3cf8687ff093a3b079 /ofxhome/__init__.py | |
parent | 2052b74bffed8b6ee7e458f8dc50dc504fcf7f46 (diff) |
Import Upstream version 0.3.2
Diffstat (limited to 'ofxhome/__init__.py')
-rw-r--r-- | ofxhome/__init__.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ofxhome/__init__.py b/ofxhome/__init__.py index 6ca3aeb..c18a369 100644 --- a/ofxhome/__init__.py +++ b/ofxhome/__init__.py @@ -2,7 +2,7 @@ import urllib from datetime import datetime from xml.dom.minidom import parseString -__version__ = '0.3.1' +__version__ = '0.3.2' API_URL='http://www.ofxhome.com/api.php' @@ -61,7 +61,10 @@ def _attr(node,name): def _text(parent,name): rc = [] - for node in parent.getElementsByTagName(name)[0].childNodes: + elements = parent.getElementsByTagName(name) + if not elements: + return '' + for node in elements[0].childNodes: if node.nodeType == node.TEXT_NODE: rc.append(node.data) return ''.join(rc) |