mirror of
https://github.com/kovidgoyal/calibre.git
synced 2026-06-04 13:05:31 -04:00
Change loading of fonts to make it platform independent. Fix a bug that could have caused temporary files to not be deleted.
This commit is contained in:
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
@@ -42,8 +42,9 @@ class _TemporaryFileWrapper(object):
|
||||
return a
|
||||
|
||||
def __del__(self):
|
||||
if os.access(self.name, os.F_OK):
|
||||
os.unlink(self.name)
|
||||
import os # Needs to be here as the main os may no longer exist
|
||||
if self.name and os.access(self.name, os.F_OK):
|
||||
os.remove(self.name)
|
||||
|
||||
|
||||
def PersistentTemporaryFile(suffix="", prefix=""):
|
||||
|
||||
Reference in New Issue
Block a user