Check for presence of os.unlink in temp.py
|Reported by:||michaelhart||Owned by:||nobody|
|Severity:||Normal||Keywords:||temp.py windows os.unlink|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Currently, loading Django in Google App Engine on Windows fails with an AttributeError on line 34 of django/core/files/temp.py because os.unlink does not exist.
I posted a ticket for it on one of the Google App Engine example apps (http://code.google.com/p/rietveld/issues/detail?id=44), and Guido suggested that I post a ticket here as you guys may want to run on a non-writable filesystem anyway.
I've attached a patch that checks if os.unlink is available before creating the Windows TemporaryFile hack. Note I'm a Python newbie so it might not be the right way to go about it, but you'll get the idea.
Also, FWIW, the bug reporting and patch submission guideline links in the "Create New Ticket" instructions don't seem to work.
Change History (8)
Changed 7 years ago by michaelhart
comment:1 Changed 7 years ago by mtredinnick
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset