From b604dd079590d1ef651c635c76b22ee9ccdd91b3 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg <rudi.grinberg@sourcefabric.org> Date: Thu, 2 Aug 2012 12:25:32 -0400 Subject: [PATCH] cc-4105: fixed bug where key was int instead of string. added more reliable error handling --- python_apps/media-monitor2/media/monitor/airtime.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python_apps/media-monitor2/media/monitor/airtime.py b/python_apps/media-monitor2/media/monitor/airtime.py index d722dce2a..3330778fe 100644 --- a/python_apps/media-monitor2/media/monitor/airtime.py +++ b/python_apps/media-monitor2/media/monitor/airtime.py @@ -143,13 +143,16 @@ class AirtimeMessageReceiver(Loggable): def rescan_watch(self, msg): self.logger.info("Trying to rescan watched directory: '%s'" % msg['directory']) try: - self.__request_now_bootstrap(msg['id']) + # id is always an integer but in the dictionary the key is always a + # string + self.__request_now_bootstrap( unicode(msg['id']) ) except DirectoryIsNotListed as e: self.logger.info("Bad rescan request") self.logger.info( str(e) ) except Exception as e: self.logger.info("Bad rescan request. Unknown error.") self.logger.info( str(e) ) + self.logger.info( traceback.format_exc() ) else: self.logger.info("Successfully re-scanned: '%s'" % msg['directory'])