提交 e7847aa7 编写于 作者: L Lucas Meneghel Rodrigues

Merge pull request #809 from lmr/fix-attribute-error

avocado.core.data_dir: Suppress AttributeError when pickling _TmpDirT…
......@@ -235,8 +235,11 @@ class _TmpDirTracker(Borg):
def __del__(self):
tmp_dir = getattr(self, 'tmp_dir', None)
if tmp_dir is not None:
if os.path.isdir(tmp_dir):
shutil.rmtree(tmp_dir)
try:
if os.path.isdir(tmp_dir):
shutil.rmtree(tmp_dir)
except AttributeError:
pass
_tmp_tracker = _TmpDirTracker()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册