mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
35df59e0be
commit
4ed951aeea
@ -93,16 +93,8 @@ def compiled_coffeescript(name, dynamic=False):
|
|||||||
else:
|
else:
|
||||||
import zipfile
|
import zipfile
|
||||||
zipf = get_path('compiled_coffeescript.zip', allow_user_override=False)
|
zipf = get_path('compiled_coffeescript.zip', allow_user_override=False)
|
||||||
try:
|
with zipfile.ZipFile(zipf, 'r') as zf:
|
||||||
with zipfile.ZipFile(zipf, 'r') as zf:
|
return zf.read(name+'.js')
|
||||||
return zf.read(name+'.js')
|
|
||||||
except EnvironmentError:
|
|
||||||
# zipfile does not exist, probably someone running with
|
|
||||||
# CALIBRE_DEVELOP_FROM and an outdated binary install, so try to
|
|
||||||
# compile from source
|
|
||||||
if os.path.exists(zipf): raise
|
|
||||||
return _compile_coffeescript(name)
|
|
||||||
|
|
||||||
|
|
||||||
__builtin__.__dict__['P'] = get_path
|
__builtin__.__dict__['P'] = get_path
|
||||||
__builtin__.__dict__['I'] = get_image_path
|
__builtin__.__dict__['I'] = get_image_path
|
||||||
|
Loading…
x
Reference in New Issue
Block a user