ts.check() is supposed to return empty list when no problems
authorPanu Matilainen <pmatilai@redhat.com>
Mon, 7 Dec 2009 10:38:39 +0000 (12:38 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Mon, 7 Dec 2009 10:38:39 +0000 (12:38 +0200)
python/rpm/transaction.py

index 2c836f3..359d62c 100644 (file)
@@ -104,13 +104,9 @@ class TransactionSet(_rpmts):
     def check(self, *args, **kwds):
         _rpmts.check(self, *args, **kwds)
 
-        probs = self.problems()
-        if not probs:
-            return None
-
         # compatibility: munge problem strings into dependency tuples of doom
         res = []
-        for p in probs:
+        for p in self.problems():
             # is it anything we need to care about?
             if p.type == rpm.RPMPROB_CONFLICT:
                 sense = rpm.RPMDEP_SENSE_CONFLICTS