From 9bc3c3d41f040e89ed13f49d4839ec8dc5336d57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 16 Nov 2020 00:04:18 +0100 Subject: [PATCH] Do not fill extra_files when not used extra_files is used only by werkzeug server on developer mode. issue9799 review296811002 --- bin/trytond | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/bin/trytond b/bin/trytond index 3465661fff..21a436e523 100755 --- a/bin/trytond +++ b/bin/trytond @@ -47,13 +47,14 @@ with commandline.pidfile(options): ssl_context=load_ssl_context(certificate, privatekey)) else: ssl_args = {} - for module in get_module_list(): - info = get_module_info(module) - for ext in ['xml', - 'fodt', 'odt', 'fodp', 'odp', 'fods', 'ods', 'fodg', 'odg', - 'txt', 'html', 'xhtml']: - path = os.path.join(info['directory'], '**', '*.' + ext) - extra_files.extend(glob.glob(path, recursive=True)) + if options.dev and not options.coroutine: + for module in get_module_list(): + info = get_module_info(module) + for ext in ['xml', + 'fodt', 'odt', 'fodp', 'odp', 'fods', 'ods', 'fodg', 'odg', + 'txt', 'html', 'xhtml']: + path = os.path.join(info['directory'], '**', '*.' + ext) + extra_files.extend(glob.glob(path, recursive=True)) if options.coroutine: from gevent.pywsgi import WSGIServer