Django

Code

Changeset 6281

Show
Ignore:
Timestamp:
09/15/07 06:19:50 (8 months ago)
Author:
mtredinnick
Message:

Fixed #5443 -- Handle lack of os.access() and os.chmod() in Jython. Thanks, Leo Soto.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/core/management/base.py

    r6094 r6281  
    207207    "Makes sure that the file is writeable. Useful if our source is read-only." 
    208208    import stat 
     209    if sys.platform.startswith('java'): 
     210        # On Jython there is no os.access() 
     211        return 
    209212    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) 
     213        st = os.stat(filename) 
     214        new_permissions = stat.S_IMODE(st.st_mode) | stat.S_IWUSR 
     215        os.chmod(filename, new_permissions) 
     216