-req = Request("%s/$s?comp=list" % (self.get_base_url(), container_name)
+req = Request("%s/%s?comp=list" % (self.get_base_url(), container_name)
-containers = dom.findall("Blob")
+containers = dom.findall(".//Blob")
Same XPath changes needed in the list_containers method, I think. Note that findall with unqualified sub-element name may work as is with lxml (I don't know, haven't been able to test), but it doesn't with stdlib xml.etree.ElementTree, which I added like so:
-from lxml import etree
+try:
- from lxml import etree
+except ImportError:
- from xml.etree import ElementTree as etree
-req = Request("%s/$s?comp=list" % (self.get_base_url(), container_name)
+req = Request("%s/%s?comp=list" % (self.get_base_url(), container_name)
-containers = dom.findall("Blob")
+containers = dom.findall(".//Blob")
Same XPath changes needed in the list_containers method, I think. Note that findall with unqualified sub-element name may work as is with lxml (I don't know, haven't been able to test), but it doesn't with stdlib xml.etree.ElementTree, which I added like so:
-from lxml import etree
+try:
+except ImportError: