This commit is contained in:
Kovid Goyal 2009-12-21 11:19:50 -07:00
parent 6574434163
commit 0a8f15225c
2 changed files with 6 additions and 2 deletions

View File

@ -46,7 +46,10 @@ class PersistentTemporaryFile(object):
self.close()
def __del__(self):
self.close()
try:
self.close()
except:
pass
def PersistentTemporaryDirectory(suffix='', prefix='', dir=None):

View File

@ -7,6 +7,7 @@ __copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>'
__docformat__ = 'restructuredtext en'
import sys, os, cPickle
from calibre.constants import isnewosx
AUTHTOOL="""#!/usr/bin/python
import os
@ -27,7 +28,7 @@ for s, l in zip(scripts, links):
DEST_PATH = '/usr/bin'
def create_symlinks():
return create_symlinks_new() if getattr(sys, 'new_app_bundle', False) else create_symlinks_old()
return create_symlinks_new() if isnewosx else create_symlinks_old()
def get_scripts():
return cPickle.load(open(P('scripts.pickle'), 'rb'))