Django Fix according to code.djangoproject.com/attachement/ticket/9115/check_for_unlink_in_temp.patch
authorSverre Rabbelier <srabbelier@gmail.com>
Mon, 03 Nov 2008 18:20:53 +0000
changeset 437 6db210684627
parent 436 f3c313d54aa4
child 438 af082c92ddda
Django Fix according to code.djangoproject.com/attachement/ticket/9115/check_for_unlink_in_temp.patch
app/django/core/files/temp.py
--- a/app/django/core/files/temp.py	Mon Nov 03 15:03:09 2008 +0000
+++ b/app/django/core/files/temp.py	Mon Nov 03 18:20:53 2008 +0000
@@ -14,7 +14,7 @@
 
 __all__ = ('NamedTemporaryFile', 'gettempdir',)
 
-if os.name == 'nt':
+if os.name == 'nt' and hasattr(os, 'unlink') and hasattr(os, 'fdopen'):
     class TemporaryFile(object):
         """
         Temporary file object constructor that works in Windows and supports