Avoid deleting the workspace twice. (#7923)

This commit is contained in:
Brad Warren
2020-04-23 23:29:16 +02:00
committed by GitHub
parent d71d3a1144
commit 4cce3458f3
@@ -86,7 +86,8 @@ class ACMEServer(object):
'alpine', 'rm', '-rf', '/workspace/boulder'])
process.wait()
finally:
shutil.rmtree(self._workspace)
if os.path.exists(self._workspace):
shutil.rmtree(self._workspace)
if self._stdout != sys.stdout:
self._stdout.close()
print('=> Test infrastructure stopped and cleaned up.')