Skip to content

Commit

Permalink
Merge pull request #66 from Staudey/fix-os-walk
Browse files Browse the repository at this point in the history
build.py: fix issues with os.walk() and bytes/string encoding
  • Loading branch information
ermo authored Jun 17, 2024
2 parents 0e1b796 + 9e84f99 commit 1a3b8c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pisi/operations/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@ def pkg_src_dir(self):
# still not exists? so try first from dirnames returned by os.walk
# usualy archives contains one root dir
src_dir = util.join_path(
self.pkg_work_dir(), os.walk(self.pkg_work_dir()).next()[1][0]
self.pkg_work_dir(), next(os.walk(self.pkg_work_dir()))[1][0]
)
if self.get_state() == "unpack":
ctx.ui.debug("Setting WorkDir to %s" % src_dir)
Expand Down Expand Up @@ -1470,7 +1470,7 @@ def accumulate_dependencies(self, path, emul32=False):
# Currently on Solus this is the same thing as /usr/lib.
valid_libs.update(["/usr/lib64", "/lib64"])

for line in out.split("\n"):
for line in out.decode().split("\n"):
line = line.strip()
g = self.shared_lib.match(line)
if g:
Expand Down

0 comments on commit 1a3b8c1

Please sign in to comment.