Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.8, 0.8.1, and 0.8.2

settings: ignore WindowsError in atomictempfile.rename()

This implies another app had the file open while we tried to write
to it (a rare event, but possible). We should fail gracefully without
a traceback. The old settings data will be retained.

Changeset fe9308d48336

Parent 880c92678ffa

by Steve Borho

Changes to one file · Browse files at fe9308d48336 Showing diff from parent 880c92678ffa Diff from another changeset...

 
94
95
96
97
 
 
 
 
98
99
100
 
94
95
96
 
97
98
99
100
101
102
103
@@ -94,7 +94,10 @@
  s = cPickle.dumps(data)   f = util.atomictempfile(appname, 'wb', None)   f.write(s) - f.rename() + try: + f.rename() + except WindowsError: + pass # silently ignore these errors     def _get_path(self, appname):   if os.name == 'nt':