From c264871ffcb3263af6888cf0447b8bbb24752a1f Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Wed, 10 Feb 2010 10:59:18 +0100 Subject: [PATCH] [entropy.security] System.get_advisories_metadata: add use_cache argument --- libraries/entropy/security.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/libraries/entropy/security.py b/libraries/entropy/security.py index 0bfab94af..236c32a9c 100644 --- a/libraries/entropy/security.py +++ b/libraries/entropy/security.py @@ -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()