[FIX] server: python3 compatibility for --dev=reload

This commit is contained in:
Fabien Meghazi
2017-09-28 14:58:38 +02:00
committed by Christophe Simonis
parent a8ecfd03c6
commit 9f9a7fdd0d
+1 -1
View File
@@ -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)