This commit is contained in:
Kovid Goyal 2013-02-12 10:25:43 +05:30
parent 286c0f3db6
commit 9a0164059a

View File

@ -100,6 +100,14 @@ def compile_coffeescript(raw, filename=None):
return fork_job('calibre.utils.serve_coffee', 'do_compile',
args=(raw,), no_output=True)['result']
def check_coffeescript(filename):
with open(filename, 'rb') as f:
raw = f.read()
cs, errs = compile_coffeescript(raw, filename)
if errs:
print('\n'.join(errs))
raise Exception('Compilation failed')
class HTTPRequestHandler(SimpleHTTPRequestHandler): # {{{
'''
Handle Range headers, as browsers insist on using range for <video> tags.