diff options
author | W. Trevor King <wking@drexel.edu> | 2008-11-22 16:46:42 -0500 |
---|---|---|
committer | W. Trevor King <wking@drexel.edu> | 2008-11-22 16:46:42 -0500 |
commit | 9524d061aa93451a282f45150944878d6b5cf065 (patch) | |
tree | 6c7054af041db29cddaf2e02a176f3c375b9fb6a | |
parent | c38d190505f11e428533837dad42dac75e22c48d (diff) | |
download | bugseverywhere-9524d061aa93451a282f45150944878d6b5cf065.tar.gz |
libbe.utility.Dir was complaining of a missing shutil in __del__().
Presumably the cleanup process removed shutil before cleaning up the Dir.
Now Dir keeps a local reference.
-rw-r--r-- | libbe/utility.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libbe/utility.py b/libbe/utility.py index 81023cd..972fe47 100644 --- a/libbe/utility.py +++ b/libbe/utility.py @@ -101,8 +101,9 @@ class Dir: "A temporary directory for testing use" def __init__(self): self.path = tempfile.mkdtemp(prefix="BEtest") + self.shutil = shutil # save local reference for __del__ def __del__(self): - shutil.rmtree(self.path) + self.shutil.rmtree(self.path) def __call__(self): return self.path |