mvadkert / rpms / beakerlib

Forked from rpms/beakerlib 6 years ago
Clone
Blob Blame History Raw
From f38e47bd18676b87db9aecbe878954b6896b569a Mon Sep 17 00:00:00 2001
From: Petr Muller <muller@redhat.com>
Date: Wed, 10 Apr 2013 19:17:01 +0200
Subject: [PATCH 2/2] mi object does not have size in old pythons

---
 src/python/journalling.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/python/journalling.py b/src/python/journalling.py
index 3c9b565..b7ede6d 100755
--- a/src/python/journalling.py
+++ b/src/python/journalling.py
@@ -318,7 +318,7 @@ class Journal(object):
   def getRpmVersion(xmldoc, package, rpm_ts):
     rpms = []
     mi = rpm_ts.dbMatch("name", package)
-    if len(mi) == 0:
+    if mi.count() == 0:
       if package != 'unknown':
         pkgDetailsEl = xmldoc.createElement("pkgnotinstalled")
         pkgDetailsCon = xmldoc.createTextNode("%s" % package)
-- 
1.9.3