Whups, don't always enable profiling in mitogen.main()

This commit is contained in:
David Wilson 2018-03-26 15:06:13 +05:45
parent 52d980ad58
commit 7698f86a9f
1 changed files with 3 additions and 2 deletions

View File

@ -110,8 +110,9 @@ def main(log_level='INFO', profiling=False):
return func
import mitogen.parent
import mitogen.utils
mitogen.core.enable_profiling()
mitogen.master.Router.profiling = profiling
if profiling:
mitogen.core.enable_profiling()
mitogen.master.Router.profiling = profiling
utils.log_to_file(level=log_level)
return mitogen.core._profile_hook(
'main',