diff options
| author | Brian Gianforcaro <bgianf@microsoft.com> | 2015-10-15 15:40:08 -0700 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-10-17 10:03:11 -0400 |
| commit | a3fffdca2472885a99e1ea9159a685753cd45738 (patch) | |
| tree | 20e4b340c0e16a373eb362c4142bf9c258791a43 | |
| parent | c1b6a8a98b08fedfa3f3c69bc7add94c5841ba57 (diff) | |
Fixed #25558 -- Fixed nondeterministic test failure on Windows: test_clearsessions_command.
The test session without an expiration date added in refs #22938 wasn't
always deleted on Windows because get_expiry_age() returns zero and the
file backend didn't consider that an expired session.
| -rw-r--r-- | django/contrib/sessions/backends/file.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/contrib/sessions/backends/file.py b/django/contrib/sessions/backends/file.py index 63de2a48c5..9170615f5a 100644 --- a/django/contrib/sessions/backends/file.py +++ b/django/contrib/sessions/backends/file.py @@ -99,7 +99,7 @@ class SessionStore(SessionBase): # Remove expired sessions. expiry_age = self.get_expiry_age(expiry=self._expiry_date(session_data)) - if expiry_age < 0: + if expiry_age <= 0: session_data = {} self.delete() self.create() |
