[EMAIL PROTECTED] said:
> Maybe that should be the default behaviour. Presumably the file has
> been deleted by some other process?
The use case is that a NamedTemporaryFile was used to securely create
and populate a file, which is then atomically (on posix) os.rename()d to
its final location.
I
Maybe that should be the default behaviour. Presumably the file has
been deleted by some other process?
--
http://mail.python.org/mailman/listinfo/python-list
Is there a better way to do this?
def QuietNamedTemporaryFile(**kwargs):
'''
Return a NamedTemporaryFile that doesn't complain when its file has already
been unlinked at __del__ time.
'''
tf = tempfile.NamedTemporaryFile(**kwargs)
def quiet_del():
try: