app/django/core/files/temp.py
changeset 437 6db210684627
parent 323 ff1a9aa48cfd
--- 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