MM2: added some docstrings to Manager.py
This commit is contained in:
parent
21bad35c39
commit
416bb5fb2b
|
@ -79,9 +79,16 @@ class Manager(Loggable):
|
||||||
watch_dir)
|
watch_dir)
|
||||||
self.remove_watch_directory(normpath(watch_dir))
|
self.remove_watch_directory(normpath(watch_dir))
|
||||||
|
|
||||||
def watch_signal(self): return self.watch_listener.signal
|
def watch_signal(self):
|
||||||
|
"""
|
||||||
|
Return the signal string our watch_listener is reading events from
|
||||||
|
"""
|
||||||
|
return self.watch_listener.signal
|
||||||
|
|
||||||
def __remove_watch(self,path):
|
def __remove_watch(self,path):
|
||||||
|
"""
|
||||||
|
Remove path from being watched (first will check if 'path' is watched)
|
||||||
|
"""
|
||||||
# only delete if dir is actually being watched
|
# only delete if dir is actually being watched
|
||||||
if path in self.__wd_path:
|
if path in self.__wd_path:
|
||||||
wd = self.__wd_path[path]
|
wd = self.__wd_path[path]
|
||||||
|
@ -89,6 +96,10 @@ class Manager(Loggable):
|
||||||
del(self.__wd_path[path])
|
del(self.__wd_path[path])
|
||||||
|
|
||||||
def __add_watch(self,path,listener):
|
def __add_watch(self,path,listener):
|
||||||
|
"""
|
||||||
|
Start watching 'path' using 'listener'. First will check if directory
|
||||||
|
is being watched before adding another watch
|
||||||
|
"""
|
||||||
self.logger.info("Adding listener '%s' to '%s'" %
|
self.logger.info("Adding listener '%s' to '%s'" %
|
||||||
( listener.__class__.__name__, path) )
|
( listener.__class__.__name__, path) )
|
||||||
if not self.has_watch(path):
|
if not self.has_watch(path):
|
||||||
|
|
Loading…
Reference in New Issue