Skip to content

Commit

Permalink
Feat: Allow to override FSMonitor class
Browse files Browse the repository at this point in the history
Will be used to test polling in addition to native FSMonitor.
  • Loading branch information
phdru authored and ljmccarthy committed Jul 4, 2018
1 parent 651d64b commit 2d2044b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fsmonitor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
from .polling import FSMonitor

class FSMonitorThread(threading.Thread):
def __init__(self, callback=None, autostart=True):
def __init__(self, callback=None, autostart=True, fsmonitor_class=None):
threading.Thread.__init__(self)
self.monitor = FSMonitor()
self.monitor = (fsmonitor_class or FSMonitor)()
self.callback = callback
self._events = []
self._events_lock = threading.Lock()
Expand Down

0 comments on commit 2d2044b

Please sign in to comment.