From cf36c13c4e74126b193a115193f6b7d140a378f5 Mon Sep 17 00:00:00 2001 From: "Benjamin T. Liu" Date: Thu, 15 Jan 2026 11:16:23 -0800 Subject: [PATCH] Add sleep and retry before logging failed unlink --- ats/tests.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ats/tests.py b/ats/tests.py index 3656bee..fc2aba5 100644 --- a/ats/tests.py +++ b/ats/tests.py @@ -719,12 +719,20 @@ def fileOutDelete(self): try: os.unlink(self.outname) except: - log('Not able to delete %s' % self.outname, echo=True, logging=True) + time.sleep(1) + try: + os.unlink(self.outname) + except: + log('Not able to delete %s' % self.outname, echo=True, logging=True) if not self.combineOutput: if os.path.exists(self.errname): try: os.unlink(self.errname) except: - log('Not able to delete %s' % self.errname, echo=True, logging=True) + time.sleep(1) + try: + os.unlink(self.errname) + except: + log('Not able to delete %s' % self.errname, echo=True, logging=True) pass