From cb6ac48dc0665d6e8dcd0bd2733d258e16bbc50f Mon Sep 17 00:00:00 2001 From: Daniel Narvaez Date: Sat, 01 Dec 2012 08:45:54 +0000 Subject: If no package in json always mark as not found Rather than tracebacking. --- diff --git a/config/packages/basesystem.json b/config/packages/basesystem.json index 750d6a1..d69fd8c 100644 --- a/config/packages/basesystem.json +++ b/config/packages/basesystem.json @@ -48,7 +48,7 @@ "iptables", "net-tools", "iputils-ping", - "isc-dhcp-client", + "isc-dhcp-client", "vim" ], "fedora": [ diff --git a/devbot/system.py b/devbot/system.py index bc8cf6c..bfeb9d2 100644 --- a/devbot/system.py +++ b/devbot/system.py @@ -97,19 +97,20 @@ def run_checks(package_manager, checks, packages): for check in checks: if not _eval_check_if(check): - print "uuuuu" continue checker = checkers[check["checker"]] if checker(check["check"]): - if distro_info.name in packages[check["name"]]: - for package in packages[check["name"]][distro_info.name]: - # Might be none, if so skip on this distro_name - if package and package not in to_install: - to_install.append(package) - else: + try: + packages_for_check = packages[check["name"]][distro_info.name] + except KeyError: + packages_for_check = [] packages_not_found.append(check) + for package in packages_for_check: + if package not in to_install: + to_install.append(package) + failed_checks.append(check) if distro_info.supported: -- cgit v0.9.1