Ticket #8616: name_error_fix.diff

File name_error_fix.diff, 754 bytes (added by warren@…, 16 years ago)

Fix potential NameError in save().

  • django/contrib/sessions/backends/file.py

     
    113113        try:
    114114            output_file_fd, output_file_name = tempfile.mkstemp(dir=dir,
    115115                prefix=prefix + '_out_')
     116            renamed = False
    116117            try:
    117118                try:
    118119                    os.write(output_file_fd, self.encode(session_data))
    119120                finally:
    120121                    os.close(output_file_fd)
    121                 renamed = False
    122122                os.rename(output_file_name, session_file_name)
    123123                renamed = True
    124124            finally:
Back to Top