mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
py3: Port one more execfile()
This commit is contained in:
parent
82083ddbb8
commit
d14acdaf67
@ -88,9 +88,9 @@ var vfs = VFS;
|
|||||||
|
|
||||||
function read_file_sync(name) {
|
function read_file_sync(name) {
|
||||||
var ans = vfs[name];
|
var ans = vfs[name];
|
||||||
if (ans) return ans;
|
if (typeof ans === "string") return ans;
|
||||||
ans = write_cache[name];
|
ans = write_cache[name];
|
||||||
if (ans) return ans;
|
if (typeof ans === "string") return ans;
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -288,7 +288,7 @@ def compile_viewer():
|
|||||||
base = base_dir()
|
base = base_dir()
|
||||||
iconf = os.path.join(base, 'imgsrc', 'srv', 'generate.py')
|
iconf = os.path.join(base, 'imgsrc', 'srv', 'generate.py')
|
||||||
g = {'__file__': iconf}
|
g = {'__file__': iconf}
|
||||||
execfile(iconf, g)
|
exec_path(iconf, g)
|
||||||
icons = g['merge']().encode('utf-8')
|
icons = g['merge']().encode('utf-8')
|
||||||
with lopen(os.path.join(base, 'resources', 'content-server', 'reset.css'), 'rb') as f:
|
with lopen(os.path.join(base, 'resources', 'content-server', 'reset.css'), 'rb') as f:
|
||||||
reset = f.read()
|
reset = f.read()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user