[FIX] fatal error when trying to enable logrotate
4e5119c6e5 didn't account for
`tools.config['workers']` being `None` on windows, resulting in the
entire thing crashing when trying to execute `None > 1` in Python 3.
Fixes #26447
This commit is contained in:
+1
-1
@@ -119,7 +119,7 @@ def init_logger():
|
||||
if dirname and not os.path.isdir(dirname):
|
||||
os.makedirs(dirname)
|
||||
if tools.config['logrotate'] is not False:
|
||||
if tools.config['workers'] > 1:
|
||||
if tools.config['workers'] and tools.config['workers'] > 1:
|
||||
# TODO: fallback to regular file logging in master for safe(r) defaults?
|
||||
#
|
||||
# Doing so here would be a good idea but also might break
|
||||
|
||||
Reference in New Issue
Block a user