[Django] #23045: Failed to load management commands after freezing by cx_freeze

13 views
Skip to first unread message

Django

unread,
Jul 16, 2014, 4:04:47 PM7/16/14
to django-...@googlegroups.com
#23045: Failed to load management commands after freezing by cx_freeze
-------------------------------------+-------------------------------------
Reporter: | Owner: nobody
keelung.yang.shandong@… | Status: new
Type: Bug | Version: master
Component: Core (Management | Keywords: management command
commands) | freeze cx_freeze
Severity: Normal | Has patch: 0
Triage Stage: Unreviewed | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Since it just searching .py but not .pyc files in function of
find_commands() in '''''django/core/management/!__init!__.py''''', but
after freezing there is no .py files.

After changing this line from
{{{#!python
return [f[:-3] for f in os.listdir(command_dir)
if not f.startswith('_') and f.endswith('.py')]
}}}

to
{{{#!python
return [f[:f.rindex('.')] for f in os.listdir(command_dir)
if not f.startswith('_') and (f.endswith('.py') or
f.endswith('.pyc'))]
}}}


it works.

Same code in branch of stable/1.7.x

--
Ticket URL: <https://code.djangoproject.com/ticket/23045>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jul 16, 2014, 5:20:26 PM7/16/14
to django-...@googlegroups.com
#23045: Failed to load management commands after freezing by cx_freeze
-------------------------------------+-------------------------------------
Reporter: | Owner: nobody
keelung.yang.shandong@… | Status: closed
Type: Bug | Version: master
Component: Core (Management | Resolution: duplicate
commands) | Triage Stage:
Severity: Normal | Unreviewed
Keywords: management command | Needs documentation: 0
freeze cx_freeze | Patch needs improvement: 0
Has patch: 0 | UI/UX: 0
Needs tests: 0 |
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by claudep):

* status: new => closed
* needs_better_patch: => 0
* resolution: => duplicate
* needs_tests: => 0
* needs_docs: => 0


Comment:

Duplicate of #14952

--
Ticket URL: <https://code.djangoproject.com/ticket/23045#comment:1>

Reply all
Reply to author
Forward
0 new messages