diff options
author | Daniel Narvaez <dwnarvaez@gmail.com> | 2012-12-01 08:45:54 (GMT) |
---|---|---|
committer | Daniel Narvaez <dwnarvaez@gmail.com> | 2012-12-01 08:49:58 (GMT) |
commit | cb6ac48dc0665d6e8dcd0bd2733d258e16bbc50f (patch) | |
tree | d18ad935f2455f43349019bdcac7c51482d6bc1d | |
parent | a04756c244b618776bbc8f6a417799e82da0de05 (diff) |
If no package in json always mark as not found
Rather than tracebacking.
-rw-r--r-- | config/packages/basesystem.json | 2 | ||||
-rw-r--r-- | devbot/system.py | 15 |
2 files changed, 9 insertions, 8 deletions
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: |