mirror of https://gitlab.com/bashrc2/epicyon
Check that not already following the moved account
parent
aee6cc313d
commit
65c783e6de
|
@ -37,14 +37,6 @@ def get_moved_accounts(base_dir: str, nickname: str, domain: str,
|
||||||
moved_accounts_filename)
|
moved_accounts_filename)
|
||||||
refollow_list = refollow_str.split('\n')
|
refollow_list = refollow_str.split('\n')
|
||||||
refollow_dict = {}
|
refollow_dict = {}
|
||||||
ctr = 0
|
|
||||||
for line in refollow_list:
|
|
||||||
if ' ' not in line:
|
|
||||||
continue
|
|
||||||
prev_handle = line.split(' ')[0]
|
|
||||||
new_handle = line.split(' ')[1]
|
|
||||||
refollow_dict[prev_handle] = new_handle
|
|
||||||
ctr = ctr + 1
|
|
||||||
|
|
||||||
follow_filename = \
|
follow_filename = \
|
||||||
acct_dir(base_dir, nickname, domain) + '/' + filename
|
acct_dir(base_dir, nickname, domain) + '/' + filename
|
||||||
|
@ -58,10 +50,20 @@ def get_moved_accounts(base_dir: str, nickname: str, domain: str,
|
||||||
follow_filename)
|
follow_filename)
|
||||||
follow_list = follow_str.split('\n')
|
follow_list = follow_str.split('\n')
|
||||||
|
|
||||||
|
ctr = 0
|
||||||
|
for line in refollow_list:
|
||||||
|
if ' ' not in line:
|
||||||
|
continue
|
||||||
|
prev_handle = line.split(' ')[0]
|
||||||
|
new_handle = line.split(' ')[1]
|
||||||
|
refollow_dict[prev_handle] = new_handle
|
||||||
|
ctr = ctr + 1
|
||||||
|
|
||||||
result = {}
|
result = {}
|
||||||
for handle in follow_list:
|
for handle in follow_list:
|
||||||
if refollow_dict.get(handle):
|
if refollow_dict.get(handle):
|
||||||
result[handle] = refollow_dict[handle]
|
if refollow_dict[handle] not in follow_list:
|
||||||
|
result[handle] = refollow_dict[handle]
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue