[FIX] server.py: FileNotFoundError doesn't exist in P2

Python2 uses IOError instead.

/!\ DO NOT FORWARD PORT AFTER 11.* /!\
This commit is contained in:
Denis Vermylen
2019-03-14 10:06:04 +00:00
parent 36ba37a7a1
commit a1fa9faa31
+2 -2
View File
@@ -134,8 +134,8 @@ class FSWatcher(object):
try:
source = open(path, 'rb').read() + '\n'
compile(source, path, 'exec')
except FileNotFoundError:
_logger.error('autoreload: python code change detected, FileNotFound for %s', path)
except IOError:
_logger.error('autoreload: python code change detected, IOError for %s', path)
except SyntaxError:
_logger.error('autoreload: python code change detected, SyntaxError in %s', path)
else: