Ticket #8455: issue-8455.errno.diff
File issue-8455.errno.diff, 914 bytes (added by , 16 years ago) |
---|
-
django/core/files/storage.py
161 161 finally: 162 162 locks.unlock(fd) 163 163 os.close(fd) 164 except OSError: 165 # Ooops, we need a new file name. 166 name = self.get_available_name(name) 167 full_path = self.path(name) 164 except OSError, e: 165 if e.errno == os.errno.EEXIST: 166 # Ooops, we need a new file name. 167 name = self.get_available_name(name) 168 full_path = self.path(name) 169 else: 170 raise 168 171 else: 169 172 # OK, the file save worked. Break out of the loop. 170 173 break