fixed truncate

This commit is contained in:
2021-06-04 17:06:07 +02:00
parent 6af405ca14
commit 2fb7387cf8
2 changed files with 2 additions and 2 deletions

View File

@@ -195,7 +195,7 @@ def is_package_failed(package: str, ver: LegacyVersion, repo: str):
if s[0] == package:
if ver > LegacyVersion(s[1]):
with failed_l, open(os.path.join(config["basedir"]["repo"], repo + "_failed.txt")) as f:
with failed_l, open(os.path.join(config["basedir"]["repo"], repo + "_failed.txt"), "r+") as f:
d = f.readlines()
f.seek(0)
f.truncate()