From 34c580db0dbc5a7e203fffabfe973e5224a3eadd Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Nov 25 2019 13:33:56 +0000 Subject: fix leaking product info when building cache When building the product cache, the information of which products a package/component is part of could be leaked from one item to the next because it's only every reset once per call. This was introduced when we moved the functionality of the ProductCache class into BugzillaProxy.build_product_cache(). Signed-off-by: Nils Philippsen --- diff --git a/distgit_bugzilla_sync/script.py b/distgit_bugzilla_sync/script.py index 9a53c46..e3a1cec 100644 --- a/distgit_bugzilla_sync/script.py +++ b/distgit_bugzilla_sync/script.py @@ -156,7 +156,6 @@ class BugzillaProxy: """ Cache the bugzilla info about each package in each product. """ - products = {} if self.config['bugzilla']['compat_api'] == 'getcomponentsdetails': # Old API -- in python-bugzilla. But with current server, this # gives ProxyError @@ -165,7 +164,6 @@ class BugzillaProxy: elif self.config['bugzilla']['compat_api'] == 'component.get': # Way that's undocumented in the partner-bugzilla api but works # currently - products = {} for collection, product in self.config["products"].items(): # restrict the list of info returned to only the packages of @@ -175,6 +173,7 @@ class BugzillaProxy: for project in pagure_projects if product in project["products"] ] + products = {} for pkg_segment in segment(pkglist, self.config['bugzilla']['req_segment']): # Format that bugzilla will understand. Strip None's that # segment() pads out the final data segment() with