File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 66import threading
77import uuid
88
9+ import pythonjsonlogger
10+
911from odoo import http
1012
1113from .strtobool import strtobool
1214
1315_logger = logging .getLogger (__name__ )
1416
15- try :
16- from pythonjsonlogger import jsonlogger
17- except ImportError :
17+ # Module ``jsonlogger`` of package ``python-json-logger`` is deprecated since version
18+ # 3.1.0, keep it for backward compatibility
19+ if hasattr (pythonjsonlogger , "json" ):
20+ jsonlogger = pythonjsonlogger .json
21+ elif hasattr (pythonjsonlogger , "jsonlogger" ):
22+ jsonlogger = pythonjsonlogger .jsonlogger
23+ else :
1824 jsonlogger = None # noqa
19- _logger .debug ("Cannot ' import pythonjsonlogger'." )
25+ _logger .debug ("Cannot import 'json' or 'jsonlogger' from ' pythonjsonlogger'." )
2026
2127
2228def is_true (strval ):
You can’t perform that action at this time.
0 commit comments