From b4bcf567a59fdb2c24feec01324e54b36026afc3 Mon Sep 17 00:00:00 2001 From: Bartek Wrona <wrona@syncad.com> Date: Tue, 4 Oct 2022 16:03:40 +0200 Subject: [PATCH] Eliminated deprecated calls to follow_api.get_followers/get_followings (switched to condenser_api) --- beem/account.py | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/beem/account.py b/beem/account.py index 7257827a..85b621c2 100644 --- a/beem/account.py +++ b/beem/account.py @@ -1092,30 +1092,18 @@ class Account(BlockchainObject): if self.blockchain.rpc.get_use_appbase(): query = {'account': self.name, 'start': last_user, 'type': what, 'limit': limit} if direction == "follower": - try: - followers = self.blockchain.rpc.get_followers(query, api='follow') - except: - followers = self.blockchain.rpc.get_followers(self.name, last_user, what, limit, api='condenser') + followers = self.blockchain.rpc.get_followers(self.name, last_user, what, limit, api='condenser') if isinstance(followers, dict) and 'followers' in followers: followers = followers['followers'] elif direction == "following": - try: - followers = self.blockchain.rpc.get_following(query, api='follow') - except: - followers = self.blockchain.rpc.get_following(self.name, last_user, what, limit, api='condenser') + followers = self.blockchain.rpc.get_following(self.name, last_user, what, limit, api='condenser') if isinstance(followers, dict) and 'following' in followers: followers = followers['following'] else: if direction == "follower": - try: - followers = self.blockchain.rpc.get_followers(self.name, last_user, what, limit, api='follow') - except: - followers = self.blockchain.rpc.get_followers([self.name, last_user, what, limit], api='condenser') + followers = self.blockchain.rpc.get_followers([self.name, last_user, what, limit], api='condenser') elif direction == "following": - try: - followers = self.blockchain.rpc.get_following(self.name, last_user, what, limit, api='follow') - except: - followers = self.blockchain.rpc.get_following(self.name, last_user, what, limit, api='condenser') + followers = self.blockchain.rpc.get_following(self.name, last_user, what, limit, api='condenser') if cnt == 0: followers_list = followers elif followers is not None and len(followers) > 1: -- GitLab