[FIX] server: python3 compatibility for --dev=reload
This commit is contained in:
committed by
Christophe Simonis
parent
a8ecfd03c6
commit
9f9a7fdd0d
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user