equal
deleted
inserted
replaced
747 try: os.unlink(temp) |
747 try: os.unlink(temp) |
748 except: pass |
748 except: pass |
749 raise |
749 raise |
750 return temp |
750 return temp |
751 |
751 |
752 class atomictempfile: |
752 class atomictempfile(object): |
753 """file-like object that atomically updates a file |
753 """file-like object that atomically updates a file |
754 |
754 |
755 All writes will be redirected to a temporary copy of the original |
755 All writes will be redirected to a temporary copy of the original |
756 file. When rename is called, the copy is renamed to the original |
756 file. When rename is called, the copy is renamed to the original |
757 name, making the changes visible. |
757 name, making the changes visible. |