in case the caller has already parsed herds.xml. This allows the
caller to parse herds.xml once an re-use the same ElementTree
instance for many different MetaDataXML instances.
class MetaDataXML(object):
"""Access metadata.xml"""
- def __init__(self, metadata_xml_path, settings=None):
+ def __init__(self, metadata_xml_path, settings=None, herdstree=None):
"""Parse a valid metadata.xml file.
@type metadata_xml_path: str
pass
# Used for caching
- self._herdstree = None
+ self._herdstree = herdstree
self._descriptions = None
self._maintainers = None
self._herds = None