From 5ef630d6d49460f75c3beb07731a51da6161e8d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Fri, 13 Jan 2017 12:51:34 +0100 Subject: [PATCH] Simplify code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Lubomír Sedlář --- pungi/gather_dnf.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pungi/gather_dnf.py b/pungi/gather_dnf.py index 24f76bca..c6d069b5 100644 --- a/pungi/gather_dnf.py +++ b/pungi/gather_dnf.py @@ -530,15 +530,15 @@ class Gather(GatherBase): self.finished_add_debug_packages[pkg] = [] continue - try: - debug_pkgs = self.finished_add_debug_packages[pkg] - except KeyError: - debug_pkgs = [] - if pkg.sourcerpm: - if self.is_native_package(pkg): - debug_pkgs = self.native_debug_packages_cache.get(pkg.sourcerpm) - else: - debug_pkgs = self.multilib_debug_packages_cache.get(pkg.sourcerpm) + if pkg in self.finished_add_debug_packages: + continue + + debug_pkgs = [] + if pkg.sourcerpm: + if self.is_native_package(pkg): + debug_pkgs = self.native_debug_packages_cache.get(pkg.sourcerpm) + else: + debug_pkgs = self.multilib_debug_packages_cache.get(pkg.sourcerpm) if not debug_pkgs: continue