Ticket #9184: storage_save_str_fix.diff
File storage_save_str_fix.diff, 743 bytes (added by , 16 years ago) |
---|
-
storage.py
157 157 fd = os.open(full_path, os.O_WRONLY | os.O_CREAT | os.O_EXCL | getattr(os, 'O_BINARY', 0)) 158 158 try: 159 159 locks.lock(fd, locks.LOCK_EX) 160 for chunk in content.chunks(): 160 if hasattr(content, 'chunks'): 161 for chunk in content.chunks(): 162 os.write(fd, chunk) 163 else: 161 164 os.write(fd, chunk) 162 165 finally: 163 166 locks.unlock(fd)