Content server: Do not show tracebacks in HTML output when not running in develop mode

This commit is contained in:
Kovid Goyal 2011-10-28 08:37:56 +05:30
parent ceb4051a8d
commit 696cd9d276

View File

@ -14,7 +14,7 @@ from calibre.constants import iswindows
import cherrypy
def start_threaded_server(db, opts):
server = LibraryServer(db, opts, embedded=True)
server = LibraryServer(db, opts, embedded=True, show_tracebacks=False)
server.thread = Thread(target=server.start)
server.thread.setDaemon(True)
server.thread.start()
@ -112,7 +112,7 @@ def main(args=sys.argv):
if opts.with_library is None:
opts.with_library = prefs['library_path']
db = LibraryDatabase2(opts.with_library)
server = LibraryServer(db, opts)
server = LibraryServer(db, opts, show_tracebacks=opts.develop)
server.start()
return 0