From ece93ac054b8fb71ec7a269b03dd91781a0ca8fb Mon Sep 17 00:00:00 2001 From: Martin Konecny Date: Mon, 7 May 2012 14:39:54 -0400 Subject: [PATCH] CC-3770: Make sure files in /srv/airtime/stor have world-readable permissions. -fix silly regression --- .../airtimefilemonitor/airtimeprocessevent.py | 10 +++++----- .../airtimefilemonitor/mediamonitorcommon.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/python_apps/media-monitor/airtimefilemonitor/airtimeprocessevent.py b/python_apps/media-monitor/airtimefilemonitor/airtimeprocessevent.py index 271976c4a..43a665a59 100644 --- a/python_apps/media-monitor/airtimefilemonitor/airtimeprocessevent.py +++ b/python_apps/media-monitor/airtimefilemonitor/airtimeprocessevent.py @@ -134,7 +134,7 @@ class AirtimeProcessEvent(ProcessEvent): #file is being overwritten/replaced in GUI. elif "goutputstream" in pathname: self.temp_files[pathname] = None - elif self.mmc.is_audio_file(pathname): + elif self.mmc.is_audio_file(name): if self.mmc.is_parent_directory(pathname, self.config.organize_directory): #file was created in /srv/airtime/stor/organize. Need to process and move @@ -150,10 +150,10 @@ class AirtimeProcessEvent(ProcessEvent): except Exception, e: self.logger.error('Exception: %s', e) self.logger.error("traceback: %s", traceback.format_exc()) - else: - #ensure file is world readable (Liquidsoap and Web UI preview) - is_recorded = self.mmc.is_parent_directory(pathname, self.config.recorded_directory) - self.file_events.append({'mode': self.config.MODE_CREATE, 'filepath': pathname, 'is_recorded_show': is_recorded}) + return + + is_recorded = self.mmc.is_parent_directory(pathname, self.config.recorded_directory) + self.file_events.append({'mode': self.config.MODE_CREATE, 'filepath': pathname, 'is_recorded_show': is_recorded}) def process_IN_MODIFY(self, event): diff --git a/python_apps/media-monitor/airtimefilemonitor/mediamonitorcommon.py b/python_apps/media-monitor/airtimefilemonitor/mediamonitorcommon.py index 7ac2d9aec..d6ace676d 100644 --- a/python_apps/media-monitor/airtimefilemonitor/mediamonitorcommon.py +++ b/python_apps/media-monitor/airtimefilemonitor/mediamonitorcommon.py @@ -314,7 +314,7 @@ class MediaMonitorCommon: self.logger.debug("Moving from %s to %s", pathname, filepath) self.move_file(pathname, filepath) - if not self.mmc.make_readable(filepath): + if not self.make_readable(filepath): self.logger.warn("Couldn't make filepath %s readable", pathname) filepath = None else: