py3: Port one more execfile()

This commit is contained in:
Kovid Goyal 2019-06-26 20:27:17 +05:30
parent 82083ddbb8
commit d14acdaf67
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -88,9 +88,9 @@ var vfs = VFS;
function read_file_sync(name) {
var ans = vfs[name];
if (ans) return ans;
if (typeof ans === "string") return ans;
ans = write_cache[name];
if (ans) return ans;
if (typeof ans === "string") return ans;
return null;
}
@ -288,7 +288,7 @@ def compile_viewer():
base = base_dir()
iconf = os.path.join(base, 'imgsrc', 'srv', 'generate.py')
g = {'__file__': iconf}
execfile(iconf, g)
exec_path(iconf, g)
icons = g['merge']().encode('utf-8')
with lopen(os.path.join(base, 'resources', 'content-server', 'reset.css'), 'rb') as f:
reset = f.read()