diff options
| author | Luke Plant <L.Plant.98@cantab.net> | 2009-09-10 15:06:04 +0000 |
|---|---|---|
| committer | Luke Plant <L.Plant.98@cantab.net> | 2009-09-10 15:06:04 +0000 |
| commit | 95393aedc989882190d7f3f4c7afee8e4dc604d3 (patch) | |
| tree | bc4b9260b2013f894d1fce67901c8893b710e26c | |
| parent | 4b82421a8503788b8a9ea517525ca3fc44de2e55 (diff) | |
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
| -rw-r--r-- | django/core/management/base.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/django/core/management/base.py b/django/core/management/base.py index b5efdbc108..76b9c0967c 100644 --- a/django/core/management/base.py +++ b/django/core/management/base.py @@ -398,7 +398,9 @@ def copy_helper(style, app_or_project, name, directory, other_name=''): if subdir.startswith('.'): del subdirs[i] 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 path_old = os.path.join(d, f) path_new = os.path.join(top_dir, relative_dir, f.replace('%s_name' % app_or_project, name)) |
