mirror of https://github.com/django/django.git
Fixed #11621 - don't copy .pyo and .py.class files from example app/project
Thanks fwierzbicki, Steve Milner git-svn-id: http://code.djangoproject.com/svn/django/trunk@11483 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
4b82421a85
commit
95393aedc9
|
@ -398,7 +398,9 @@ def copy_helper(style, app_or_project, name, directory, other_name=''):
|
||||||
if subdir.startswith('.'):
|
if subdir.startswith('.'):
|
||||||
del subdirs[i]
|
del subdirs[i]
|
||||||
for f in files:
|
for f in files:
|
||||||
if f.endswith('.pyc'):
|
if not f.endswith('.py'):
|
||||||
|
# Ignore .pyc, .pyo, .py.class etc, as they cause various
|
||||||
|
# breakages.
|
||||||
continue
|
continue
|
||||||
path_old = os.path.join(d, f)
|
path_old = os.path.join(d, f)
|
||||||
path_new = os.path.join(top_dir, relative_dir, f.replace('%s_name' % app_or_project, name))
|
path_new = os.path.join(top_dir, relative_dir, f.replace('%s_name' % app_or_project, name))
|
||||||
|
|
Loading…
Reference in New Issue