SaveFile: unlink(tmppath): only ignore FileNotFoundError

This commit is contained in:
Marian Beermann 2016-07-26 22:40:23 +02:00
parent dec671d8ff
commit 863ab66908
1 changed files with 1 additions and 1 deletions

View File

@ -137,7 +137,7 @@ class SaveFile:
from .. import platform from .. import platform
try: try:
os.unlink(self.tmppath) os.unlink(self.tmppath)
except OSError: except FileNotFoundError:
pass pass
self.fd = platform.SyncFile(self.tmppath, self.binary) self.fd = platform.SyncFile(self.tmppath, self.binary)
return self.fd return self.fd