# HG changeset patch # User Changaco # Date 1344092258 -7200 # Node ID 5bb7c2939da055f56f23feb0b0f1a8fb3093e0b9 # Parent b763ca08408804db950a2c4a8396fbed842e08f8 add some debug logging Signed-off-by: Changaco diff --git a/feed-push b/feed-push --- a/feed-push +++ b/feed-push @@ -168,15 +168,19 @@ def handle_feed_change(path, event): feed_fd = path_to_feed_fd[path] feed_fd.seek(0) feed = feedparser.parse(feed_fd.read()) + i = 0 for entry in reversed(feed.entries): if entry.id in state['id_cache'].get(feed_fd.name, []) or \ not global_args.flood and calendar.timegm(entry.published_parsed) < time.time() - 86400: continue + i += 1 for feed_path_to_commands in config_to_feed_paths_to_commands.values(): for cmd in feed_path_to_commands.get(path, []): run_command(format_cmd(cmd, feed=feed.feed, entry=entry), entry.content[0].value) state['id_cache'][feed_fd.name] = [entry.id for entry in feed.entries] save_state() + if i == 0: + log(LOG_DEBUG, 'received GAMChanged event on "%s" but no new entry was found' % path) elif event == gamin.GAMDeleted: path_to_feed_fd.pop(path).close() else: