diff options
author | Tatyana Leontovich <tleontov@yahoo-inc.com> | 2013-02-27 11:28:03 +0200 |
---|---|---|
committer | Tatyana Leontovich <tleontov@yahoo-inc.com> | 2013-02-27 11:28:03 +0200 |
commit | 406f1adf45be4e6cc74b9e524c53c8227d34fcd9 (patch) | |
tree | a821cf6c7a48e1ae8f55f5822e5f5b9d02c10543 | |
parent | d77f86218e4c0c2f5371accce64605e7cfff41c5 (diff) | |
download | python-neutronclient-406f1adf45be4e6cc74b9e524c53c8227d34fcd9.tar.gz |
quantumclient.common.serializer module cleanup
Remove unused methods in quantumclient.common.serializer.XMLDeserializer
that tries to access non existing attributes of xml node:
* find_first_child_named
* extract_text
* find_children_named
Change-Id: I0aff5933fa75e50748e9d0325d898c2f6836fa58
Fixes: bug #1132850
-rw-r--r-- | quantumclient/common/serializer.py | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/quantumclient/common/serializer.py b/quantumclient/common/serializer.py index 7eba930..8dc1edf 100644 --- a/quantumclient/common/serializer.py +++ b/quantumclient/common/serializer.py @@ -321,27 +321,6 @@ class XMLDeserializer(TextDeserializer): child, listnames) return result - def find_first_child_named(self, parent, name): - """Search a nodes children for the first child with a given name""" - for node in parent.childNodes: - if node.nodeName == name: - return node - return None - - def find_children_named(self, parent, name): - """Return all of a nodes children who have the given name""" - for node in parent.childNodes: - if node.nodeName == name: - yield node - - def extract_text(self, node): - """Get the text field contained by the given node""" - if len(node.childNodes) == 1: - child = node.childNodes[0] - if child.nodeType == child.TEXT_NODE: - return child.nodeValue - return "" - def default(self, datastring): return {'body': self._from_xml(datastring)} |