From 6e1c46dab96395b437f77ee0c39deffa47042408 Mon Sep 17 00:00:00 2001 From: Luke Plant Date: Fri, 10 Sep 2010 13:09:19 +0000 Subject: [PATCH] [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 --- django/core/cache/backends/filebased.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/core/cache/backends/filebased.py b/django/core/cache/backends/filebased.py index fe833336d0..6057f11ef7 100644 --- a/django/core/cache/backends/filebased.py +++ b/django/core/cache/backends/filebased.py @@ -116,7 +116,7 @@ class CacheClass(BaseCache): return try: - filelist = os.listdir(self._dir) + filelist = sorted(os.listdir(self._dir)) except (IOError, OSError): return