Opened 7 years ago

Closed 7 years ago

Last modified 4 years ago

#8673 closed (fixed)

Missing import in django.core.files.move

Reported by: vung Owned by: nobody
Component: File uploads/storage Version: master
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

In [8493] the copied copystat in django.core.files.move uses stat.S_IMODE, but stat is not imported.

Attachments (2)

copystat-missing-import.diff (716 bytes) - added by vung 7 years ago.
copystat-missing-import-2.diff (536 bytes) - added by vung 7 years ago.
Moved the import in the exception handling block as suggested by julien

Download all attachments as: .zip

Change History (5)

Changed 7 years ago by vung

comment:1 Changed 7 years ago by julien

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

Just a small suggestion, maybe the import should be under the ImportError block:

try:
    from shutil import copystat
except ImportError:
    import stat
    ...

Changed 7 years ago by vung

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

comment:2 Changed 7 years ago by jacob

  • Resolution set to fixed
  • Status changed from new to closed

(In [8720]) Fixed #8673: fixed a missing import in django.core.files.move.

comment:3 Changed 4 years ago by jacob

  • milestone 1.0 deleted

Milestone 1.0 deleted

Note: See TracTickets for help on using tickets.
Back to Top