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:
Kovid Goyal
2007-06-10 02:20:31 +00:00
parent d0f55a2a44
commit de0596066d
8 changed files with 6 additions and 2 deletions
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.
+3 -2
View File
@@ -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=""):