From 97bb041ba31e414af164883f5ba5a90a4fcd1e7b Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Mon, 27 Aug 2012 12:08:21 -0400 Subject: [PATCH] cc-3936: Added assertion for organizer to only handle correct events. --- python_apps/media-monitor2/media/monitor/organizer.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python_apps/media-monitor2/media/monitor/organizer.py b/python_apps/media-monitor2/media/monitor/organizer.py index 42d567dc8..bd4f218f0 100644 --- a/python_apps/media-monitor2/media/monitor/organizer.py +++ b/python_apps/media-monitor2/media/monitor/organizer.py @@ -5,6 +5,7 @@ import media.monitor.owners as owners from media.monitor.handler import ReportHandler from media.monitor.log import Loggable from media.monitor.exceptions import BadSongFile +from media.monitor.events import OrganizeFile class Organizer(ReportHandler,Loggable): """ @@ -39,6 +40,8 @@ class Organizer(ReportHandler,Loggable): directory and place it in the correct path (starting with self.target_path) """ + # Only handle this event type + assert isinstance(event, OrganizeFile) try: # We must select the target_path based on whether file was recorded # by airtime or not.