mirror of https://github.com/django/django.git
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
This commit is contained in:
parent
7239429851
commit
89633c3077
|
@ -113,12 +113,12 @@ class SessionStore(SessionBase):
|
||||||
try:
|
try:
|
||||||
output_file_fd, output_file_name = tempfile.mkstemp(dir=dir,
|
output_file_fd, output_file_name = tempfile.mkstemp(dir=dir,
|
||||||
prefix=prefix + '_out_')
|
prefix=prefix + '_out_')
|
||||||
|
renamed = False
|
||||||
try:
|
try:
|
||||||
try:
|
try:
|
||||||
os.write(output_file_fd, self.encode(session_data))
|
os.write(output_file_fd, self.encode(session_data))
|
||||||
finally:
|
finally:
|
||||||
os.close(output_file_fd)
|
os.close(output_file_fd)
|
||||||
renamed = False
|
|
||||||
os.rename(output_file_name, session_file_name)
|
os.rename(output_file_name, session_file_name)
|
||||||
renamed = True
|
renamed = True
|
||||||
finally:
|
finally:
|
||||||
|
|
Loading…
Reference in New Issue