summaryrefslogtreecommitdiff
path: root/odoo/netsvc.py
diff options
context:
space:
mode:
authorMagnus <magnus.kriel@gmail.com>2018-08-31 02:20:10 +1200
committerxmo-odoo <xmo@odoo.com>2018-08-30 16:20:10 +0200
commit4877030d64b22e045dcaf02be531a5f69123b389 (patch)
tree08e36a6d6ed1428e77f6dde861386c1472b81b89 /odoo/netsvc.py
parent0fd5c70940f2088f2bba3625396276f3aec08217 (diff)
[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
Diffstat (limited to 'odoo/netsvc.py')
-rw-r--r--odoo/netsvc.py2
1 files changed, 1 insertions, 1 deletions
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