From 4aa74e8a788fd5b46dbf88a42dc2a54900747134 Mon Sep 17 00:00:00 2001 From: Giovanni Harting <539@idlegandalf.com> Date: Thu, 13 Aug 2020 09:44:14 +0200 Subject: [PATCH] check for file exists --- master.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/master.py b/master.py index 589f24a..4e6adf8 100644 --- a/master.py +++ b/master.py @@ -42,8 +42,11 @@ def find_all_files_for_pkg(name, repo): def get_failed_packages(repo): - with open(os.path.join(config["basedir"]["repo"], repo + "_failed.txt")) as p: - return p.read().splitlines() + if os.path.exists(os.path.join(config["basedir"]["repo"], repo + "_failed.txt")): + with open(os.path.join(config["basedir"]["repo"], repo + "_failed.txt")) as p: + return p.read().splitlines() + else: + return [] def build(pkgbuild, repo):