From 3b9efee8e39bc168b4a550861feb7b77262828db Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Tue, 7 Aug 2012 10:26:35 -0400 Subject: [PATCH] cc-4105: removed limitation from map_events not supporting pack properly --- python_apps/media-monitor2/media/monitor/events.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/python_apps/media-monitor2/media/monitor/events.py b/python_apps/media-monitor2/media/monitor/events.py index 841aebbfc..1a7cb582a 100644 --- a/python_apps/media-monitor2/media/monitor/events.py +++ b/python_apps/media-monitor2/media/monitor/events.py @@ -114,12 +114,10 @@ class MoveFile(BaseEvent, HasMetaData): return [req_dict] def map_events(directory, constructor): - #return map(lambda f: constructor( FakePyinotify(f) ).pack(), - #mmp.walk_supported(directory.replace("-unknown-path",""), - #clean_empties=False)) for f in mmp.walk_supported(directory.replace("-unknown-path",""), clean_empties=True): - try: yield constructor( FakePyinotify(f) ).pack()[0] + try: + for e in constructor( FakePyinotify(f) ).pack(): yield e except BadSongFile as e: yield e class DeleteDir(BaseEvent):