projects
/
be.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c38d190
)
libbe.utility.Dir was complaining of a missing shutil in __del__().
author
W. Trevor King
<wking@drexel.edu>
Sat, 22 Nov 2008 21:46:42 +0000
(16:46 -0500)
committer
W. Trevor King
<wking@drexel.edu>
Sat, 22 Nov 2008 21:46:42 +0000
(16:46 -0500)
Presumably the cleanup process removed shutil before cleaning up the Dir.
Now Dir keeps a local reference.
libbe/utility.py
patch
|
blob
|
history
diff --git
a/libbe/utility.py
b/libbe/utility.py
index 81023cd8ba64b5a38c9eb821ab8565039cf85db6..972fe47959bc24e448d07fb55f2abd12f8799f5b 100644
(file)
--- 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)
+ s
elf.s
hutil.rmtree(self.path)
def __call__(self):
return self.path