From ee54ef2b81317e042026c2b8d1f904a7583badf5 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Tue, 28 Aug 2012 17:26:33 -0400 Subject: [PATCH] mm2: checking for null value --- python_apps/media-monitor2/media/monitor/manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python_apps/media-monitor2/media/monitor/manager.py b/python_apps/media-monitor2/media/monitor/manager.py index 0a0fcfec3..4b1356291 100644 --- a/python_apps/media-monitor2/media/monitor/manager.py +++ b/python_apps/media-monitor2/media/monitor/manager.py @@ -93,7 +93,7 @@ class Manager(Loggable): ( listener.__class__.__name__, path) ) wd = self.wm.add_watch(path, pyinotify.ALL_EVENTS, rec=True, auto_add=True, proc_fun=listener) - self.__wd_path[path] = wd.values()[0] + if wd: self.__wd_path[path] = wd.values()[0] def __create_organizer(self, target_path, recorded_path): """