Py3 compatability

This commit is contained in:
Pedro Algarvio 2015-01-07 06:10:57 +00:00
parent 231e1ba414
commit 12024a4670

View File

@ -470,7 +470,7 @@ def installed(name,
# ' '.join((pkg.items()[0][0], pkg.items()[0][1].replace(',', ';')))
# pkgs = ','.join([prepro(pkg) for pkg in pkgs])
prepro = lambda pkg: pkg if type(pkg) == str else \
' '.join((pkg.items()[0][0], pkg.items()[0][1]))
' '.join((six.iteritems(pkg)[0][0], six.iteritems(pkg)[0][1]))
pkgs = [prepro(pkg) for pkg in pkgs]
ret = {'name': ';'.join(pkgs), 'result': None,