Skip to content

Commit

Permalink
Refactor callback and errback function name
Browse files Browse the repository at this point in the history
  • Loading branch information
ardhipoetra committed Jun 27, 2016
1 parent aa4266f commit a1e9d2c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Tribler/Policies/BoostingSource.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ def __init__(self, session, rss_feed, boost_settings, torrent_insert_cb):

self.torrent_db = self.session.open_dbhandler(NTFY_TORRENTS)

def _success_rss(self, body_rss, rss_feed):
def _on_success_rss(self, body_rss, rss_feed):
"""
function called when RSS successfully read
"""
Expand All @@ -323,7 +323,7 @@ def _success_rss(self, body_rss, rss_feed):
self._logger.info("Got RSS feed %s", rss_feed)
self.ready = True

def _error_rss(self, failure, rss_feed):
def _on_error_rss(self, failure, rss_feed):
"""
function called when RSS failed except from 503
aborting load the source
Expand All @@ -341,8 +341,8 @@ def _error_rss(self, failure, rss_feed):
def _load(self, rss_feed):

defer_feed = getPage(rss_feed)
defer_feed.addCallback(self._success_rss, rss_feed)
defer_feed.addErrback(self._error_rss, rss_feed)
defer_feed.addCallback(self._on_success_rss, rss_feed)
defer_feed.addErrback(self._on_error_rss, rss_feed)

self.register_task(str(self.source)+"_wait_feed", defer_feed)

Expand Down

0 comments on commit a1e9d2c

Please sign in to comment.