mirror of
https://github.com/wting/autojump
synced 2024-10-27 20:34:07 +00:00
remove harmless error message
This commit is contained in:
parent
3bd45e5304
commit
51ae7c9293
3
autojump
3
autojump
@ -37,7 +37,10 @@ def save(path_dict,dic_file):
|
||||
f.flush()
|
||||
os.fsync(f)
|
||||
f.close()
|
||||
try:
|
||||
os.rename(dic_file+".tmp",dic_file) #cf. http://thunk.org/tytso/blog/2009/03/15/dont-fear-the-fsync/
|
||||
except OSError:
|
||||
pass #Fail quietly, this usually means a concurrent autojump process already did the job
|
||||
#import shutil
|
||||
#shutil.copy(dic_file+".tmp",dic_file) #cPickle.dump doesn't seem to be atomic, so this is more secure
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user