mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 08:11:00 +00:00
Always use PollingObserver
This commit is contained in:
parent
9f1c46e7d6
commit
8fee5db675
@ -13,12 +13,7 @@ from mitmproxy import ctx
|
|||||||
|
|
||||||
|
|
||||||
import watchdog.events
|
import watchdog.events
|
||||||
# The OSX reloader in watchdog 0.8.3 breaks when unobserving paths.
|
from watchdog.observers import polling
|
||||||
# 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
|
|
||||||
|
|
||||||
|
|
||||||
def parse_command(command):
|
def parse_command(command):
|
||||||
@ -134,7 +129,7 @@ class Script:
|
|||||||
def configure(self, options):
|
def configure(self, options):
|
||||||
self.last_options = options
|
self.last_options = options
|
||||||
if not self.observer:
|
if not self.observer:
|
||||||
self.observer = Observer()
|
self.observer = polling.PollingObserver()
|
||||||
# Bind the handler to the real underlying master object
|
# Bind the handler to the real underlying master object
|
||||||
self.observer.schedule(
|
self.observer.schedule(
|
||||||
ReloadHandler(self.reload),
|
ReloadHandler(self.reload),
|
||||||
|
Loading…
Reference in New Issue
Block a user