From bbabdcda670b96dbd99700c01c56b31a99e59691 Mon Sep 17 00:00:00 2001 From: martin Date: Tue, 19 Jul 2011 17:16:42 -0400 Subject: [PATCH] -remove CueFile imports. --- .../airtimemediamonitorbootstrap.py | 12 +++++------- python_apps/pypo/pypo-cli.py | 1 - python_apps/pypo/pypofetch.py | 1 - python_apps/pypo/pypopush.py | 1 - 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/python_apps/media-monitor/airtimefilemonitor/airtimemediamonitorbootstrap.py b/python_apps/media-monitor/airtimefilemonitor/airtimemediamonitorbootstrap.py index 97822611e..e1fb2e43c 100644 --- a/python_apps/media-monitor/airtimefilemonitor/airtimemediamonitorbootstrap.py +++ b/python_apps/media-monitor/airtimefilemonitor/airtimemediamonitorbootstrap.py @@ -101,32 +101,30 @@ class AirtimeMediaMonitorBootstrap(): not affect last modified timestamp). Lets get a list of files that are on the file-system that the db has no record of, and vice-versa. """ - deleted_files_set = db_known_files_set - all_files_set new_files_set = all_files_set - db_known_files_set modified_files_set = new_and_modified_files - new_files_set + self.logger.info("Known files: \n%s\n\n"%db_known_files_set) self.logger.info("Deleted files: \n%s\n\n"%deleted_files_set) self.logger.info("New files: \n%s\n\n"%new_files_set) self.logger.info("Modified files: \n%s\n\n"%modified_files_set) #"touch" file timestamp - self.mmc.touch_index_file() + try: + self.mmc.touch_index_file() + except Exception, e: + self.logger.warn(e) for file_path in deleted_files_set: self.pe.handle_removed_file(False, "%s%s" % (dir, file_path)) - deleted_files_set.clear() for file_path in new_files_set: file_path = "%s%s" % (dir, file_path) if os.path.exists(file_path): self.pe.handle_created_file(False, os.path.basename(file_path), file_path) - new_files_set.clear() - for file_path in modified_files_set: file_path = "%s%s" % (dir, file_path) if os.path.exists(file_path): self.pe.handle_modified_file(False, os.path.basename(file_path), file_path) - modified_files_set.clear() - diff --git a/python_apps/pypo/pypo-cli.py b/python_apps/pypo/pypo-cli.py index 702ad8dd4..0c9fbb233 100755 --- a/python_apps/pypo/pypo-cli.py +++ b/python_apps/pypo/pypo-cli.py @@ -20,7 +20,6 @@ from pypofetch import PypoFetch from configobj import ConfigObj # custom imports -from util import CueFile from api_clients import api_client PYPO_VERSION = '1.1' diff --git a/python_apps/pypo/pypofetch.py b/python_apps/pypo/pypofetch.py index d9d78ddea..9bd165653 100755 --- a/python_apps/pypo/pypofetch.py +++ b/python_apps/pypo/pypofetch.py @@ -19,7 +19,6 @@ from kombu.connection import BrokerConnection from kombu.messaging import Exchange, Queue, Consumer, Producer from api_clients import api_client -from util import CueFile from configobj import ConfigObj diff --git a/python_apps/pypo/pypopush.py b/python_apps/pypo/pypopush.py index 60dd4f522..a4cc46282 100755 --- a/python_apps/pypo/pypopush.py +++ b/python_apps/pypo/pypopush.py @@ -12,7 +12,6 @@ import math from threading import Thread from api_clients import api_client -from util import CueFile from configobj import ConfigObj