[FIX] core: WatchedFileHandler compat for 3.7

Fine tuning of 8eaac97, the `errors` attribute was added in py38[^1]

[^1]: python/cpython@ca7b504a4d

closes odoo/odoo#112588

X-original-commit: c6c19ff6a3093fe64035d9f970ab35522f8080f5
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
This commit is contained in:
Julien Castiaux
2023-02-13 21:28:15 +01:00
parent fa60348883
commit 36ef9cb30f
+1
View File
@@ -28,6 +28,7 @@ def log(logger, level, prefix, msg, depth=None):
class WatchedFileHandler(logging.handlers.WatchedFileHandler):
def __init__(self, filename):
self.errors = None # py38
super().__init__(filename)
# Unfix bpo-26789, in case the fix is present
self._builtin_open = None