diff options
author | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2016-01-27 10:12:18 +0100 |
---|---|---|
committer | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2016-01-27 10:36:28 +0100 |
commit | 8c375383148f100f03aed52827ac513f145078c2 (patch) | |
tree | dbae3b5d4d603e5e226477f1938119e2acfcfc1f /libmproxy/script/reloader.py | |
parent | c2bb29f669cd80509f4efe205551a9cf5fc29770 (diff) | |
download | mitmproxy-8c375383148f100f03aed52827ac513f145078c2.tar.gz mitmproxy-8c375383148f100f03aed52827ac513f145078c2.tar.bz2 mitmproxy-8c375383148f100f03aed52827ac513f145078c2.zip |
code formatting: fix whitespace issues
Diffstat (limited to 'libmproxy/script/reloader.py')
-rw-r--r-- | libmproxy/script/reloader.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libmproxy/script/reloader.py b/libmproxy/script/reloader.py index e81bdef6..b4acf51b 100644 --- a/libmproxy/script/reloader.py +++ b/libmproxy/script/reloader.py @@ -1,11 +1,11 @@ import os import sys -from watchdog.events import RegexMatchingEventHandler +from watchdog.events import RegexMatchingEventHandler if sys.platform == 'darwin': 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. +# The OSX reloader in watchdog 0.8.3 breaks when unobserving paths. # We use the PollingObserver instead. _observers = {} @@ -31,11 +31,12 @@ def unwatch(script): class _ScriptModificationHandler(RegexMatchingEventHandler): + def __init__(self, callback, filename='.*'): super(_ScriptModificationHandler, self).__init__( ignore_directories=True, - regexes=['.*'+filename] + regexes=['.*' + filename] ) self.callback = callback @@ -43,4 +44,3 @@ class _ScriptModificationHandler(RegexMatchingEventHandler): self.callback() __all__ = ["watch", "unwatch"] - |