aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2016-07-14 21:33:53 +1200
committerAldo Cortesi <aldo@nullcube.com>2016-07-14 21:33:53 +1200
commit8fee5db675744a6cc9a3462b7d1261e0b940545c (patch)
tree0300e85e0236cad246ef089df3f4e982de4f4118
parent9f1c46e7d69ab96790f34fc6d52f246bb9bfdfdc (diff)
downloadmitmproxy-8fee5db675744a6cc9a3462b7d1261e0b940545c.tar.gz
mitmproxy-8fee5db675744a6cc9a3462b7d1261e0b940545c.tar.bz2
mitmproxy-8fee5db675744a6cc9a3462b7d1261e0b940545c.zip
Always use PollingObserver
-rw-r--r--mitmproxy/builtins/script.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/mitmproxy/builtins/script.py b/mitmproxy/builtins/script.py
index 34801ff7..f6cf093f 100644
--- a/mitmproxy/builtins/script.py
+++ b/mitmproxy/builtins/script.py
@@ -13,12 +13,7 @@ from mitmproxy import ctx
import watchdog.events
-# The OSX reloader in watchdog 0.8.3 breaks when unobserving paths.
-# We use the PollingObserver instead.
-if sys.platform == 'darwin': # pragma: no cover
- from watchdog.observers.polling import PollingObserver as Observer
-else:
- from watchdog.observers import Observer
+from watchdog.observers import polling
def parse_command(command):
@@ -134,7 +129,7 @@ class Script:
def configure(self, options):
self.last_options = options
if not self.observer:
- self.observer = Observer()
+ self.observer = polling.PollingObserver()
# Bind the handler to the real underlying master object
self.observer.schedule(
ReloadHandler(self.reload),