mercurial/util.py
changeset 16703 7292a4618f46
parent 16688 cfb6682961b8
child 16705 c2d9ef43ff6c
equal deleted inserted replaced
16702:1751d96d324f 16703:7292a4618f46
   760             ofp.write(chunk)
   760             ofp.write(chunk)
   761         ifp.close()
   761         ifp.close()
   762         ofp.close()
   762         ofp.close()
   763     except:
   763     except:
   764         try: os.unlink(temp)
   764         try: os.unlink(temp)
   765         except: pass
   765         except OSError: pass
   766         raise
   766         raise
   767     return temp
   767     return temp
   768 
   768 
   769 class atomictempfile(object):
   769 class atomictempfile(object):
   770     '''writeable file object that atomically updates a file
   770     '''writeable file object that atomically updates a file