summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Kaplan-Moss <jacob@jacobian.org>2008-09-01 20:25:16 +0000
committerJacob Kaplan-Moss <jacob@jacobian.org>2008-09-01 20:25:16 +0000
commit89633c3077e116ef2fd7f157eef3ffcdc3b14c7f (patch)
tree78b96d0a1a764e99329237e1e410bcd1d7ad251e
parent7239429851712ac2fc4d4657e5f2477cd2c45994 (diff)
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
-rw-r--r--django/contrib/sessions/backends/file.py2
1 files changed, 1 insertions, 1 deletions
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: