cc-4228: removed two subtle bugs where hooks were added wrong and packing and hooking was called in wrong order

This commit is contained in:
Rudi Grinberg 2012-08-17 10:35:16 -04:00
parent c1cc1c8fba
commit 2ec3e9f72f
1 changed files with 1 additions and 2 deletions
python_apps/media-monitor2/media/monitor

View File

@ -84,8 +84,8 @@ class BaseEvent(Loggable):
# pack will only throw an exception if it processes one file but this
# is a little bit hacky
try:
ret = self.pack()
self._pack_hook()
ret = self.pack()
return ret
except BadSongFile as e: return [e]
@ -95,7 +95,6 @@ class BaseEvent(Loggable):
self._raw_event = evt
self.path = evt.path
self.__class__ = evt.__class__
self.add_safe_pack_hook(evt._pack_hook)
return self
class FakePyinotify(object):