Skip to content

Commit

Permalink
Fixed a small oversight in [8750]; thanks for the sharp eyes, Warren. F…
Browse files Browse the repository at this point in the history
…ixes #8616.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8812 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
jacobian committed Sep 1, 2008
1 parent 7239429 commit 89633c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion django/contrib/sessions/backends/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,12 @@ def save(self, must_create=False):
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:
Expand Down

0 comments on commit 89633c3

Please sign in to comment.