Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #5443 -- Handle lack of os.access() and os.chmod() in Jython. T…

…hanks, Leo Soto.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@6281 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 7ca1a04633a7516df3610ff97a83d8850219622d 1 parent ff25059
@malcolmt malcolmt authored
Showing with 7 additions and 3 deletions.
  1. +7 −3 django/core/management/base.py
View
10 django/core/management/base.py
@@ -206,7 +206,11 @@ def copy_helper(style, app_or_project, name, directory, other_name=''):
def _make_writeable(filename):
"Makes sure that the file is writeable. Useful if our source is read-only."
import stat
+ if sys.platform.startswith('java'):
+ # On Jython there is no os.access()
+ return
if not os.access(filename, os.W_OK):
- st = os.stat(filename)
- new_permissions = stat.S_IMODE(st.st_mode) | stat.S_IWUSR
- os.chmod(filename, new_permissions)
+ st = os.stat(filename)
+ new_permissions = stat.S_IMODE(st.st_mode) | stat.S_IWUSR
+ os.chmod(filename, new_permissions)
+
Please sign in to comment.
Something went wrong with that request. Please try again.