diff -r a729ba90ca04 django/core/management/base.py
a
|
b
|
def _make_writeable(filename):
|
206 | 206 | def _make_writeable(filename): |
207 | 207 | "Makes sure that the file is writeable. Useful if our source is read-only." |
208 | 208 | import stat |
209 | | if not os.access(filename, os.W_OK): |
210 | | st = os.stat(filename) |
211 | | new_permissions = stat.S_IMODE(st.st_mode) | stat.S_IWUSR |
212 | | os.chmod(filename, new_permissions) |
| 209 | if not sys.platform.startswith('java'): # On Jython there is no os.access() |
| 210 | if not os.access(filename, os.W_OK): |
| 211 | st = os.stat(filename) |
| 212 | new_permissions = stat.S_IMODE(st.st_mode) | stat.S_IWUSR |
| 213 | os.chmod(filename, new_permissions) |