Code

Opened 6 years ago

Closed 6 years ago

Last modified 3 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 6 years ago.
copystat-missing-import-2.diff (536 bytes) - added by vung 6 years ago.
Moved the import in the exception handling block as suggested by julien

Download all attachments as: .zip

Change History (5)

Changed 6 years ago by vung

comment:1 Changed 6 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 6 years ago by vung

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

comment:2 Changed 6 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 3 years ago by jacob

  • milestone 1.0 deleted

Milestone 1.0 deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.