Try/Except on os.remove
This commit is contained in:
parent
212ae68256
commit
ccf7a5411e
1 changed files with 10 additions and 2 deletions
12
master.cfg
12
master.cfg
|
@ -489,10 +489,18 @@ send to the gdb-testers mailing list."""
|
|||
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)
|
||||
try:
|
||||
os.remove (lockfile)
|
||||
except OSError as e:
|
||||
print "Failed with: ", e.strerror
|
||||
print "Error code: ", e.code
|
||||
if mid_file and os.path.exists (mid_file):
|
||||
# Garbage-collect the Message-Id file
|
||||
os.remove (mid_file)
|
||||
try:
|
||||
os.remove (mid_file)
|
||||
except OSError as e:
|
||||
print "Failed with: ", e.streror
|
||||
print "Error code: ", e.code
|
||||
|
||||
return { 'body' : text,
|
||||
'type' : 'plain',
|
||||
|
|
Loading…
Reference in a new issue