Skip to content

Commit 6e1c46d

Browse files
committed
[1.2.X] Fixed #14250 - FileBasedCacheTests.test_cull test failure
This patch makes the cull behaviour (which files deleted and how many deleted) deterministic. Backport of [13705] from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13706 bcc190cf-cafb-0310-a4f2-bffc1f526a37
1 parent 6ea9025 commit 6e1c46d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

django/core/cache/backends/filebased.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def _cull(self):
116116
return
117117

118118
try:
119-
filelist = os.listdir(self._dir)
119+
filelist = sorted(os.listdir(self._dir))
120120
except (IOError, OSError):
121121
return
122122

0 commit comments

Comments
 (0)