1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Removed rmtree_errorhandler.

The stated reason for its introduction in d18d37ce no longer applies
since Django's code repository was switched from Subversion to git.

Furthermore it never had any effect because shutil.rmtree ignores its
onerror argument when ignore_errors is True.

The reason for its use in template management commands is unclear.
This commit is contained in:
Aymeric Augustin
2015-02-22 17:49:29 +01:00
parent b2f331dc68
commit c688460df6
3 changed files with 3 additions and 34 deletions

View File

@@ -20,7 +20,7 @@ from django.core.management import call_command
from django.template import Context, Template
from django.test import TestCase, override_settings
from django.utils import six
from django.utils._os import rmtree_errorhandler, symlinks_supported, upath
from django.utils._os import symlinks_supported, upath
from django.utils.encoding import force_text
from django.utils.functional import empty
@@ -106,9 +106,7 @@ class BaseCollectionTestCase(BaseStaticFilesTestCase):
self.patched_settings = self.settings(STATIC_ROOT=temp_dir)
self.patched_settings.enable()
self.run_collectstatic()
# Use our own error handler that can handle .svn dirs on Windows
self.addCleanup(shutil.rmtree, temp_dir,
ignore_errors=True, onerror=rmtree_errorhandler)
self.addCleanup(shutil.rmtree, temp_dir)
def tearDown(self):
self.patched_settings.disable()