diff --git a/pisi/operations/build.py b/pisi/operations/build.py index 51c5f8af..d96d501c 100644 --- a/pisi/operations/build.py +++ b/pisi/operations/build.py @@ -684,7 +684,7 @@ class Builder: if not ext: break if not os.path.exists(src_dir): - src_dir = util.join_path(self.pkg_work_dir(), [d for d in os.walk(self.pkg_work_dir()).next()[1] if not d.startswith(".")][0]) + src_dir = util.join_path(self.pkg_work_dir(), [d for d in next(os.walk(self.pkg_work_dir()))[1] if not d.startswith(".")][0]) if self.get_state() == "unpack": ctx.ui.debug("Using %s as WorkDir" % src_dir)