From 5489a733c732d48830c5b7ee2dac702ccbc65781 Mon Sep 17 00:00:00 2001 From: Dan Mick Date: Tue, 14 Jun 2016 21:36:06 -0700 Subject: [PATCH] util.py: use passed package_versions dict even if empty Signed-off-by: Dan Mick --- teuthology/suite/util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/teuthology/suite/util.py b/teuthology/suite/util.py index 65fb1bf3fc..ef771671f1 100644 --- a/teuthology/suite/util.py +++ b/teuthology/suite/util.py @@ -358,7 +358,7 @@ def get_package_versions(sha1, os_type, kernel_flavor, package_versions=None): for all hashs and distros, not just for the given hash and distro. """ - if not package_versions: + if package_versions is None: package_versions = dict() os_type = str(os_type) @@ -415,7 +415,7 @@ def has_packages_for_distro(sha1, os_type, kernel_flavor, :returns: True, if packages are found. False otherwise. """ os_type = str(os_type) - if not package_versions: + if package_versions is None: package_versions = get_package_versions(sha1, os_type, kernel_flavor) package_versions_for_hash = package_versions.get(sha1, dict()).get( -- 2.39.5