cc-3936: Dirty hack to fix issue. We are using pydispatch to add new watch directories and giving the mm.manager another responsiblity

it should not have.
This commit is contained in:
Rudi Grinberg 2012-08-27 16:48:39 -04:00
parent 57020b6e3b
commit 7d29379b07
4 changed files with 23 additions and 4 deletions

View file

@ -54,6 +54,10 @@ class Manager(Loggable):
def dummy(sender, event): self.watch_move( event.path, sender=sender )
dispatcher.connect(dummy, signal='watch_move', sender=dispatcher.Any,
weak=False)
def subwatch_add(sender, directory):
self.__add_watch(directory, self.watch_listener)
dispatcher.connect(subwatch_add, signal='add_subwatch',
sender=dispatcher.Any, weak=False)
# A private mapping path => watch_descriptor
# we use the same dictionary for organize, watch, store wd events.
# this is a little hacky because we are unable to have multiple wd's