From 416bb5fb2bef242724e312b3e7b30d04b2b842c2 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Tue, 28 Aug 2012 17:39:25 -0400 Subject: [PATCH] MM2: added some docstrings to Manager.py --- python_apps/media-monitor2/media/monitor/manager.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/python_apps/media-monitor2/media/monitor/manager.py b/python_apps/media-monitor2/media/monitor/manager.py index e3c1c6243..fcceb153f 100644 --- a/python_apps/media-monitor2/media/monitor/manager.py +++ b/python_apps/media-monitor2/media/monitor/manager.py @@ -79,9 +79,16 @@ class Manager(Loggable): 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): + """ + Remove path from being watched (first will check if 'path' is watched) + """ # only delete if dir is actually being watched if path in self.__wd_path: wd = self.__wd_path[path] @@ -89,6 +96,10 @@ class Manager(Loggable): del(self.__wd_path[path]) 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'" % ( listener.__class__.__name__, path) ) if not self.has_watch(path):