Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
lxd-images: Use tempfile instead of memory #1301
Conversation
tych0
reviewed
Nov 11, 2015
| + # Create our workdir | ||
| + self.workdir = tempfile.mkdtemp() | ||
| + | ||
| + def __del__(self): |
tych0
Nov 11, 2015
Member
So I always thought this sucked, but __del__ isn't guaranteed to ever be called. If you want cleanup behavior, you have to use a context manager and define __exit__. (Perhaps we don't care about this as it rarely happens, but it's worth noting.)
stgraber
Nov 11, 2015
Owner
Yeah, not sure how much we care about this right now with lxd-images going away real soon.
It looks like I've been lucky though as I've yet to see a case where it doesn't trigger :)
|
Also we really need to figure out what's going on with that kvm test... |
stgraber
added some commits
Nov 11, 2015
added a commit
that referenced
this pull request
Nov 11, 2015
tych0
merged commit e9b91f7
into
lxc:master
Nov 11, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
stgraber commentedNov 11, 2015
Closes #1300
Signed-off-by: Stéphane Graber stgraber@ubuntu.com