[entropy.spm] fix search_paths_owners (qfile) with Python 3

This commit is contained in:
Sławomir Nizio
2019-11-08 01:19:01 +01:00
parent 998cd2d755
commit 7fc5bd3380
@@ -2100,14 +2100,17 @@ class PortagePlugin(SpmPlugin):
matches.clear()
break
pkgs = set([x.strip() for x in proc.stdout.readlines()])
out = proc.stdout.read()
if const_is_python3():
out = const_convert_to_unicode(out)
proc.stdout.close()
pkgs = set([x.strip() for x in out.splitlines()])
for pkg in pkgs:
slot = self.get_installed_package_metadata(pkg, "SLOT")
obj = matches.setdefault((pkg, slot,), set())
obj.add(filename)
proc.stdout.close()
if rc == 0:
return matches