From 9f9a7fdd0d70c1edda94fc546916c9e3516477ad Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Fri, 22 Sep 2017 20:40:00 +0200 Subject: [PATCH] [FIX] server: python3 compatibility for `--dev=reload` --- odoo/service/server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/odoo/service/server.py b/odoo/service/server.py index 6e7d67eb933..de959cc31da 100644 --- a/odoo/service/server.py +++ b/odoo/service/server.py @@ -135,7 +135,7 @@ class FSWatcher(object): path = getattr(event, 'dest_path', event.src_path) if path.endswith('.py'): try: - source = open(path, 'rb').read() + '\n' + source = open(path, 'rb').read() + b'\n' compile(source, path, 'exec') except SyntaxError: _logger.error('autoreload: python code change detected, SyntaxError in %s', path)