From: Dan Mick Date: Wed, 15 Jun 2016 04:36:06 +0000 (-0700) Subject: util.py: use passed package_versions dict even if empty X-Git-Tag: 1.1.0~595^2~2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=5489a733c732d48830c5b7ee2dac702ccbc65781;p=teuthology.git util.py: use passed package_versions dict even if empty Signed-off-by: Dan Mick --- 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(