replaced os.mkdir with pathlib mkdir
This commit is contained in:
@@ -63,7 +63,7 @@ def build(pkgbuild, repo):
|
|||||||
|
|
||||||
# write logs to file
|
# write logs to file
|
||||||
if not os.path.exists(os.path.join(config["basedir"]["repo"], "logs", repo)):
|
if not os.path.exists(os.path.join(config["basedir"]["repo"], "logs", repo)):
|
||||||
os.mkdir(os.path.join(config["basedir"]["repo"], "logs", repo))
|
pathlib.Path(os.path.join(config["basedir"]["repo"], "logs", repo)).mkdir(parents=True, exist_ok=True)
|
||||||
|
|
||||||
with open(os.path.join(config["basedir"]["repo"], "logs", repo, name + ".log"), "w") as log:
|
with open(os.path.join(config["basedir"]["repo"], "logs", repo, name + ".log"), "w") as log:
|
||||||
log.write(res.stdout.decode())
|
log.write(res.stdout.decode())
|
||||||
|
Reference in New Issue
Block a user