More random thrashing trying to understand spurious

Windows failures.  Who's keeping a bz2 file open?
This commit is contained in:
Tim Peters 2006-05-27 12:36:53 +00:00
parent b7c8f54c33
commit de41dc865a
1 changed files with 13 additions and 1 deletions

View File

@ -633,7 +633,19 @@ def test_main():
if gzip: if gzip:
os.remove(tarname("gz")) os.remove(tarname("gz"))
if bz2: if bz2:
os.remove(tarname("bz2")) # Grrr. This frequently blows up on the Windows buildbot
# slaves. No idea why. Adding more output to try to guess
# something. Can't reproduce at will.
import time, sys
for dummy in range(10):
try:
os.remove(tarname("bz2"))
except OSError, msg:
print >> sys.stderr, \
"test_tarfile final cleanup crapped out %s" % msg
time.sleep(1)
else:
break
if os.path.exists(dirname()): if os.path.exists(dirname()):
shutil.rmtree(dirname()) shutil.rmtree(dirname())
if os.path.exists(tmpname()): if os.path.exists(tmpname()):