From 92b91d6e7b91a8d94b1e3b8d6d2059d57395c25d Mon Sep 17 00:00:00 2001 From: Luke Plant Date: Fri, 10 Sep 2010 13:03:02 +0000 Subject: [PATCH] Fixed #14250 - FileBasedCacheTests.test_cull test failure This patch makes the cull behaviour (which files deleted and how many deleted) deterministic. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13705 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 fe833336d0d92..6057f11ef7b0b 100644 --- a/django/core/cache/backends/filebased.py +++ b/django/core/cache/backends/filebased.py @@ -116,7 +116,7 @@ def _cull(self): return try: - filelist = os.listdir(self._dir) + filelist = sorted(os.listdir(self._dir)) except (IOError, OSError): return