mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
6574434163
commit
0a8f15225c
@ -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):
|
||||
|
@ -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'))
|
||||
|
Loading…
x
Reference in New Issue
Block a user