Opened 13 years ago
Closed 13 years ago
#19085 closed Bug (duplicate)
manage.py does not find custom commands if only .pyc file exists
| Reported by: | Daniel Swarbrick | Owned by: | nobody |
|---|---|---|---|
| Component: | Core (Management commands) | Version: | dev |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | yes | UI/UX: | no |
Description
django.core.management.find_commands() is written such that it only looks for .py files in the custom command directories. This fails if, for example, a project has been byte-compiled (eg. with compileall) and the original source .py files removed.
The attached patch will find .pyc and .pyo files as well (whilst still returning a list of unique commands).
Attachments (1)
Change History (2)
by , 13 years ago
| Attachment: | custom-commands.diff added |
|---|
comment:1 by , 13 years ago
| Resolution: | → duplicate |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Thanks for the report, but this has already been marked as won't fix in #14952. I don't think that our position on this matter changed.