From 33b44ce84ba0d00003d7c9b6500e60c1bb247672 Mon Sep 17 00:00:00 2001 From: Xavier-Do Date: Fri, 23 Sep 2022 08:39:12 +0000 Subject: [PATCH] [FIX] config: don't save deprecated longpolling-port MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Longpolling port is replaced with gevent port and is deprecated This commit avoid saving the value. Not really usefull but when saved the value was None leadind to an error when casting to int. The default value should be an int. closes odoo/odoo#100991 X-original-commit: adac9a9ceaa173c0181a4fc57d0ea83b7a37fc71 Signed-off-by: Christophe Monniez (moc) Signed-off-by: Xavier Dollé (xdo) --- odoo/tools/config.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/odoo/tools/config.py b/odoo/tools/config.py index 1348969e8ce..8edd55827b6 100644 --- a/odoo/tools/config.py +++ b/odoo/tools/config.py @@ -85,7 +85,8 @@ class configmanager(object): # Not exposed in the configuration file. self.blacklist_for_save = set([ 'publisher_warranty_url', 'load_language', 'root_path', - 'init', 'save', 'config', 'update', 'stop_after_init', 'dev_mode', 'shell_interface' + 'init', 'save', 'config', 'update', 'stop_after_init', 'dev_mode', 'shell_interface', + 'longpolling_port', ]) # dictionary mapping option destination (keys in self.options) to MyOptions. @@ -135,7 +136,7 @@ class configmanager(object): "Keep empty to listen on all interfaces (0.0.0.0)") group.add_option("-p", "--http-port", dest="http_port", my_default=8069, help="Listen port for the main HTTP service", type="int", metavar="PORT") - group.add_option("--longpolling-port", dest="longpolling_port", my_default=None, + group.add_option("--longpolling-port", dest="longpolling_port", my_default=0, help="Deprecated alias to the gevent-port option", type="int", metavar="PORT") group.add_option("--gevent-port", dest="gevent_port", my_default=8072, help="Listen port for the gevent worker", type="int", metavar="PORT")