cc-4105: removed limitation from map_events not supporting pack properly

This commit is contained in:
Rudi Grinberg 2012-08-07 10:26:35 -04:00
parent 1e7de08bf3
commit 3b9efee8e3
1 changed files with 2 additions and 4 deletions

View File

@ -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):