diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2011-02-20 22:33:47 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2011-02-20 22:33:47 +0200 |
commit | 7786995cd1e539ac410aec1cd32fb99becc92deb (patch) | |
tree | 1f77137cc6ecd1221efd915235aab98dae16b660 | |
parent | b9f5062c227f4a8feff83c0ee1cde2929da7cd3e (diff) | |
download | librpm-tizen-7786995cd1e539ac410aec1cd32fb99becc92deb.tar.gz librpm-tizen-7786995cd1e539ac410aec1cd32fb99becc92deb.tar.bz2 librpm-tizen-7786995cd1e539ac410aec1cd32fb99becc92deb.zip |
Allow both string + unicode in python addInstall() / addErase()
-rw-r--r-- | python/rpm/transaction.py | 4 |
1 files 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)) |