From 4877030d64b22e045dcaf02be531a5f69123b389 Mon Sep 17 00:00:00 2001 From: Magnus Date: Fri, 31 Aug 2018 02:20:10 +1200 Subject: [PATCH] [FIX] fatal error when trying to enable logrotate 4e5119c6e52e0364a39a7883f9df5db5441607cb 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 --- odoo/netsvc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/odoo/netsvc.py b/odoo/netsvc.py index c8d9dbb6441..b6170bd0f57 100644 --- a/odoo/netsvc.py +++ b/odoo/netsvc.py @@ -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