Only use inotify on linux (#1541)

Fixes #1540
This commit is contained in:
Peter VandeHaar 2017-07-12 05:55:48 -04:00 committed by Berker Peksag
parent c58560b895
commit fc7c15abbd

View File

@ -53,12 +53,14 @@ class Reloader(threading.Thread):
self._callback(filename)
time.sleep(self._interval)
try:
from inotify.adapters import Inotify
import inotify.constants
has_inotify = True
except ImportError:
has_inotify = False
has_inotify = False
if sys.platform.startswith('linux'):
try:
from inotify.adapters import Inotify
import inotify.constants
has_inotify = True
except ImportError:
pass
class InotifyReloader():