From a89211046cee4992b050a789f305ec9eb756032d Mon Sep 17 00:00:00 2001 From: Sergio Durigan Junior Date: Sun, 1 Oct 2017 21:06:43 -0400 Subject: [PATCH] Guarding the exclusion of mid_file on MessageGDBTesters --- master.cfg | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/master.cfg b/master.cfg index a137c49..49ba5c1 100644 --- a/master.cfg +++ b/master.cfg @@ -480,13 +480,15 @@ send to the gdb-testers mailing list.""" # There is no build breakage anymore! Yay! Now, let's see if # we need to clean up any lock file from previous breaks. lockfile = make_breakage_lockfile_name (branch, name) - with open (lockfile, 'r') as f: - rev_broke = f.readline ().lstrip ("Commit: ") - mid_file = make_breakage_root_message_id_filename (rev_broke, branch) + rev_broke = None + mid_file = None if os.path.exists (lockfile): + with open (lockfile, 'r') as f: + rev_broke = f.readline ().lstrip ("Commit: ") + mid_file = make_breakage_root_message_id_filename (rev_broke, branch) # We need to clean the lockfile. Garbage-collect it here. os.remove (lockfile) - if os.path.exists (mid_file): + if mid_file and os.path.exists (mid_file): # Garbage-collect the Message-Id file os.remove (mid_file)