From 7786995cd1e539ac410aec1cd32fb99becc92deb Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Sun, 20 Feb 2011 22:33:47 +0200 Subject: Allow both string + unicode in python addInstall() / addErase() --- python/rpm/transaction.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/rpm/transaction.py b/python/rpm/transaction.py index adcb1bb88..73e4b3c15 100644 --- a/python/rpm/transaction.py +++ b/python/rpm/transaction.py @@ -45,7 +45,7 @@ class TransactionSet(TransactionSetCore): return tuple(keys) def addInstall(self, item, key, how="u"): - if isinstance(item, str): + if isinstance(item, basestring): f = file(item) header = self.hdrFromFdno(f) f.close() @@ -69,7 +69,7 @@ class TransactionSet(TransactionSetCore): hdrs = item elif isinstance(item, int): hdrs = self.dbMatch(rpm.RPMDBI_PACKAGES, item) - elif isinstance(item, str): + elif isinstance(item, basestring): hdrs = self.dbMatch(rpm.RPMDBI_LABEL, item) else: raise TypeError("invalid type %s" % type(item)) -- cgit v1.2.3