def try_sub(tries): if tries > 1: ff = RemoteFeed.load(context.db, feed.id) else: ff = feed return hubbub_sub(ff, context, hub_url=hub)