mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
446eb08a55
commit
8f38433a26
@ -138,6 +138,10 @@ class Handler(SimpleHTTPServer.SimpleHTTPRequestHandler): # {{{
|
|||||||
class HTTPD(SocketServer.TCPServer):
|
class HTTPD(SocketServer.TCPServer):
|
||||||
allow_reuse_address = True
|
allow_reuse_address = True
|
||||||
|
|
||||||
|
# }}}
|
||||||
|
|
||||||
|
compile_coffeescript = Compiler()
|
||||||
|
|
||||||
def serve(resources={}, port=8000):
|
def serve(resources={}, port=8000):
|
||||||
Handler.special_resources = resources
|
Handler.special_resources = resources
|
||||||
httpd = HTTPD(('0.0.0.0', port), Handler)
|
httpd = HTTPD(('0.0.0.0', port), Handler)
|
||||||
@ -146,9 +150,6 @@ def serve(resources={}, port=8000):
|
|||||||
httpd.serve_forever()
|
httpd.serve_forever()
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
raise SystemExit(0)
|
raise SystemExit(0)
|
||||||
# }}}
|
|
||||||
|
|
||||||
compile_coffeescript = Compiler()
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
import argparse
|
import argparse
|
||||||
|
Loading…
x
Reference in New Issue
Block a user