From 89633c3077e116ef2fd7f157eef3ffcdc3b14c7f Mon Sep 17 00:00:00 2001 From: Jacob Kaplan-Moss Date: Mon, 1 Sep 2008 20:25:16 +0000 Subject: [PATCH] Fixed a small oversight in [8750]; thanks for the sharp eyes, Warren. Fixes #8616. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8812 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/contrib/sessions/backends/file.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/contrib/sessions/backends/file.py b/django/contrib/sessions/backends/file.py index 91b375cc50..3f6350345f 100644 --- a/django/contrib/sessions/backends/file.py +++ b/django/contrib/sessions/backends/file.py @@ -113,12 +113,12 @@ class SessionStore(SessionBase): try: output_file_fd, output_file_name = tempfile.mkstemp(dir=dir, prefix=prefix + '_out_') + renamed = False try: try: os.write(output_file_fd, self.encode(session_data)) finally: os.close(output_file_fd) - renamed = False os.rename(output_file_name, session_file_name) renamed = True finally: