mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
py3: Fix compilation of viewer code
This commit is contained in:
parent
cd64459718
commit
8cb9dc1ca1
@ -291,9 +291,9 @@ def compile_viewer():
|
|||||||
iconf = os.path.join(base, 'imgsrc', 'srv', 'generate.py')
|
iconf = os.path.join(base, 'imgsrc', 'srv', 'generate.py')
|
||||||
g = {'__file__': iconf}
|
g = {'__file__': iconf}
|
||||||
exec_path(iconf, g)
|
exec_path(iconf, g)
|
||||||
icons = g['merge']().encode('utf-8')
|
icons = g['merge']()
|
||||||
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().decode('utf-8')
|
||||||
html = '<!DOCTYPE html>\n<html><head><style>{reset}</style></head><body>{icons}</body></html>'.format(
|
html = '<!DOCTYPE html>\n<html><head><style>{reset}</style></head><body>{icons}</body></html>'.format(
|
||||||
icons=icons, reset=reset)
|
icons=icons, reset=reset)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user