From 5f5a93617d3994aa29cef9ef760ba013fa6b4d85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 28 Apr 2024 10:43:14 +0200 Subject: [PATCH] Fallback to store true for indexes command line option BooleanOptionalAction does not exist on Python 3.8 --- trytond/trytond/commandline.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/trytond/trytond/commandline.py b/trytond/trytond/commandline.py index 07e0961d6a..db8343848a 100644 --- a/trytond/trytond/commandline.py +++ b/trytond/trytond/commandline.py @@ -108,7 +108,8 @@ def get_parser_admin(): metavar='MODULE', help="activate or update modules").completer = module_completer parser.add_argument( - "--indexes", dest="indexes", action=argparse.BooleanOptionalAction, + "--indexes", dest="indexes", + action=getattr(argparse, 'BooleanOptionalAction', 'store_true'), default=None, help="update indexes") parser.add_argument("--all", dest="update", action="append_const", const="ir", help="update all activated modules")