aboutsummaryrefslogtreecommitdiffstats
path: root/mitmproxy/script
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2016-06-28 22:09:12 -0700
committerMaximilian Hils <git@maximilianhils.com>2016-06-28 22:09:12 -0700
commita57ea27bd471f7c3b96e321db337531e5a30d7fe (patch)
tree1a8f027581b74d1c900946527d473209f4ebcdf6 /mitmproxy/script
parent4f7d108722212f92f1abed9933ad2060a9b10853 (diff)
downloadmitmproxy-a57ea27bd471f7c3b96e321db337531e5a30d7fe.tar.gz
mitmproxy-a57ea27bd471f7c3b96e321db337531e5a30d7fe.tar.bz2
mitmproxy-a57ea27bd471f7c3b96e321db337531e5a30d7fe.zip
watchdog: always use PollingObserver
Diffstat (limited to 'mitmproxy/script')
-rw-r--r--mitmproxy/script/reloader.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/mitmproxy/script/reloader.py b/mitmproxy/script/reloader.py
index f5470bbf..0a3f5c93 100644
--- a/mitmproxy/script/reloader.py
+++ b/mitmproxy/script/reloader.py
@@ -5,12 +5,10 @@ import sys
from watchdog.events import RegexMatchingEventHandler
-if sys.platform == 'darwin': # pragma: no cover
- from watchdog.observers.polling import PollingObserver as Observer
-else:
- from watchdog.observers import Observer
-# The OSX reloader in watchdog 0.8.3 breaks when unobserving paths.
-# We use the PollingObserver instead.
+from watchdog.observers.polling import PollingObserver as Observer
+# We occasionally have watchdog errors on Windows, Linux and Mac when using the native observers.
+# After reading through the watchdog source code and issue tracker,
+# we may want to replace this with a very simple implementation of our own.
_observers = {}