Django

Code

Ticket #8673 (closed: fixed)

Opened 3 months ago

Last modified 3 months ago

Missing import in django.core.files.move

Reported by: vung Assigned to: nobody
Milestone: 1.0 Component: File uploads/storage
Version: SVN Keywords:
Cc: Triage Stage: Accepted
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

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

Attachments

copystat-missing-import.diff (0.7 kB) - added by vung on 08/29/08 04:17:56.
copystat-missing-import-2.diff (0.5 kB) - added by vung on 08/29/08 07:13:18.
Moved the import in the exception handling block as suggested by julien

Change History

08/29/08 04:17:56 changed by vung

  • attachment copystat-missing-import.diff added.

08/29/08 04:24:21 changed by julien

  • needs_better_patch changed.
  • stage changed from Unreviewed to Accepted.
  • needs_tests changed.
  • needs_docs changed.

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

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

08/29/08 07:13:18 changed by vung

  • attachment copystat-missing-import-2.diff added.

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

08/29/08 15:00:56 changed by jacob

  • status changed from new to closed.
  • resolution set to fixed.

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


Add/Change #8673 (Missing import in django.core.files.move)




Change Properties
Action