fix the usage of next function #4

This commit is contained in:
Safa Arıman
2019-08-18 13:45:02 +03:00
parent 780359cd95
commit 3aca907a26
+1 -1
View File
@@ -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)