[entropy.security] System.get_advisories_metadata: add use_cache argument

This commit is contained in:
Fabio Erculiani
2010-02-10 10:59:18 +01:00
parent f6e4c46695
commit c264871ffc
+5 -4
View File
@@ -599,16 +599,17 @@ class System:
x.startswith("glsa-")])
return xmls
def get_advisories_metadata(self):
def get_advisories_metadata(self, use_cache = True):
"""
Get security advisories metadata.
@return: advisories metadata
@rtype: dict
"""
cached = self.get_advisories_cache()
if cached is not None:
return cached
if use_cache:
cached = self.get_advisories_cache()
if cached is not None:
return cached
adv_metadata = {}
xmls = self._get_advisories_list()