summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Plant <L.Plant.98@cantab.net>2010-09-03 18:29:33 +0000
committerLuke Plant <L.Plant.98@cantab.net>2010-09-03 18:29:33 +0000
commit7a601b3fc121d613dc56cd1db82a128f0fd95fa1 (patch)
treebd8c615e848e2e6c22b1a5269daad0827fa1a3df
parent7a1b69418937fa589602ea104a24213d80585b47 (diff)
[1.2.X] Fixed #14145 - undeterministic behavior when project or app template contains dotdir
Thanks to marbu for report and patch. Backport of [13668] from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13681 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/core/management/base.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/core/management/base.py b/django/core/management/base.py
index 6761cb69bc..3e20e2db29 100644
--- a/django/core/management/base.py
+++ b/django/core/management/base.py
@@ -394,9 +394,9 @@ def copy_helper(style, app_or_project, name, directory, other_name=''):
relative_dir = d[len(template_dir)+1:].replace('%s_name' % app_or_project, name)
if relative_dir:
os.mkdir(os.path.join(top_dir, relative_dir))
- for i, subdir in enumerate(subdirs):
+ for subdir in subdirs[:]:
if subdir.startswith('.'):
- del subdirs[i]
+ subdirs.remove(subdir)
for f in files:
if not f.endswith('.py'):
# Ignore .pyc, .pyo, .py.class etc, as they cause various