fix: dependencies and deprecated code (#390)

This commit is contained in:
Vincent Renaville
2022-11-04 14:34:29 +01:00
committed by GitHub
co-authored by GitHub
parent 14cab08024
commit dddd130e79
14 changed files with 224 additions and 111 deletions
@@ -5,7 +5,7 @@ import inspect
import logging
import os
import time
from distutils.util import strtobool
from .strtobool import strtobool
import psycopg2
import odoo
@@ -0,0 +1,21 @@
_MAP = {
'y': True,
'yes': True,
't': True,
'true': True,
'on': True,
'1': True,
'n': False,
'no': False,
'f': False,
'false': False,
'off': False,
'0': False
}
def strtobool(value):
try:
return _MAP[str(value).lower()]
except KeyError:
raise ValueError('"{}" is not a valid bool value'.format(value))