]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Remove unused find_attribute_or_element()
authorKen'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
Fri, 6 Mar 2015 08:25:01 +0000 (08:25 +0000)
committerJohn Griffith <john.griffith8@gmail.com>
Fri, 24 Apr 2015 00:57:57 +0000 (00:57 +0000)
find_attribute_or_element() is not used since the first commit
(c53d8e343e50d4cf7ea9a6a81258848c2d893bfb), then this patch removes
the method.

Change-Id: I3429860e7b1eb983b994b5c1c16caff1fef066ff

cinder/api/openstack/wsgi.py

index 266931e3d334bbc6629f7ac4ea28b07ac9964292..c72da755d4b9ad94a199b90dfefaa92ff4780fae 100644 (file)
@@ -373,17 +373,6 @@ class XMLDeserializer(TextDeserializer):
                 text.append(child.nodeValue)
         return ''.join(text)
 
-    def find_attribute_or_element(self, parent, name):
-        """Get an attribute value; fallback to an element if not found."""
-        if parent.hasAttribute(name):
-            return parent.getAttribute(name)
-
-        node = self.find_first_child_named(parent, name)
-        if node:
-            return self.extract_text(node)
-
-        return None
-
     def default(self, datastring):
         return {'body': self._from_xml(datastring)}