]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
util.py: use passed package_versions dict even if empty
authorDan Mick <dan.mick@redhat.com>
Wed, 15 Jun 2016 04:36:06 +0000 (21:36 -0700)
committerDan Mick <dan.mick@redhat.com>
Thu, 23 Jun 2016 21:14:42 +0000 (14:14 -0700)
Signed-off-by: Dan Mick <dan.mick@redhat.com>
teuthology/suite/util.py

index 65fb1bf3fc022ef2326b2f8f6c7d82473ff4a70f..ef771671f14829dd25056135e53aff8a44720c2e 100644 (file)
@@ -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(