From 63087f339f5da85a2167da35e6ac1517e8e8d0e8 Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Thu, 26 Nov 2009 17:24:56 +0000 Subject: [PATCH] Fixed output_twitter.py to call correctly --- output_twitter.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/output_twitter.py b/output_twitter.py index 8411b78..31914f0 100644 --- a/output_twitter.py +++ b/output_twitter.py @@ -40,21 +40,24 @@ class OutputTwitter: def get_config(self, feed): config = feed.config['twitter'] - config.setdefault('active', True) + config.setdefault('active', False) config.setdefault('apiurl', 'http://twitter.com/') return config - def feed_exit(self, feed): + def on_feed_exit(self, feed): """Send email at exit.""" config = self.get_config(feed) if not config['active']: + log.debug("twitter plugin not active") return # don't send twits when learning if feed.manager.options.learn: + log.debug("learn mode, skipping") return + log.debug("Loading twitter api") api = twitter.Api(username=config['username'], password=config['password']) if not api.GetFriends(): @@ -78,4 +81,5 @@ try: except ImportError: raise PluginError('Unable to import module twitter, python-twitter is required to use output_twitter') else: + log.debug("Registering plugin: twitter") register_plugin(OutputTwitter, 'twitter')