Ticket #8673: copystat-missing-import-2.diff

File copystat-missing-import-2.diff, 536 bytes (added by vung, 11 years ago)

Moved the import in the exception handling block as suggested by julien

  • django/core/files/move.py

     
    99from django.core.files import locks
    1010
    1111try:
    1212    from shutil import copystat
    1313except ImportError:
     14    import stat
    1415    def copystat(src, dst):
    1516        """Copy all stat info (mode bits, atime and mtime) from src to dst"""
    1617        st = os.stat(src)
    1718        mode = stat.S_IMODE(st.st_mode)
    1819        if hasattr(os, 'utime'):
Back to Top