mirror of https://gitlab.com/bashrc2/epicyon
Less indentation
parent
13378eebbe
commit
c47b0eb7a1
56
migrate.py
56
migrate.py
|
@ -158,35 +158,35 @@ def _update_moved_handle(base_dir: str, nickname: str, domain: str,
|
||||||
if follow_handle.strip("\n").strip("\r").lower() != \
|
if follow_handle.strip("\n").strip("\r").lower() != \
|
||||||
handle_lower:
|
handle_lower:
|
||||||
foll2.write(follow_handle)
|
foll2.write(follow_handle)
|
||||||
else:
|
continue
|
||||||
handle_nickname = handle.split('@')[0]
|
handle_nickname = handle.split('@')[0]
|
||||||
handle_domain = handle.split('@')[1]
|
handle_domain = handle.split('@')[1]
|
||||||
unfollow_account(base_dir, nickname, domain,
|
unfollow_account(base_dir, nickname, domain,
|
||||||
handle_nickname,
|
handle_nickname,
|
||||||
handle_domain,
|
handle_domain,
|
||||||
debug, group_account, 'following.txt')
|
debug, group_account, 'following.txt')
|
||||||
ctr += 1
|
ctr += 1
|
||||||
print('Unfollowed ' + handle + ' who has moved to ' +
|
print('Unfollowed ' + handle + ' who has moved to ' +
|
||||||
moved_to_handle)
|
moved_to_handle)
|
||||||
|
|
||||||
# save the new handles to the refollow list
|
# save the new handles to the refollow list
|
||||||
if os.path.isfile(refollow_filename):
|
if os.path.isfile(refollow_filename):
|
||||||
try:
|
try:
|
||||||
with open(refollow_filename, 'a+',
|
with open(refollow_filename, 'a+',
|
||||||
encoding='utf-8') as refoll:
|
encoding='utf-8') as refoll:
|
||||||
refoll.write(moved_to_handle + '\n')
|
refoll.write(moved_to_handle + '\n')
|
||||||
except OSError:
|
except OSError:
|
||||||
print('EX: ' +
|
print('EX: ' +
|
||||||
'_update_moved_handle unable to append ' +
|
'_update_moved_handle unable to append ' +
|
||||||
refollow_filename)
|
refollow_filename)
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
with open(refollow_filename, 'w+',
|
with open(refollow_filename, 'w+',
|
||||||
encoding='utf-8') as refoll:
|
encoding='utf-8') as refoll:
|
||||||
refoll.write(moved_to_handle + '\n')
|
refoll.write(moved_to_handle + '\n')
|
||||||
except OSError:
|
except OSError:
|
||||||
print('EX: _update_moved_handle unable to write ' +
|
print('EX: _update_moved_handle unable to write ' +
|
||||||
refollow_filename)
|
refollow_filename)
|
||||||
|
|
||||||
followers_filename = \
|
followers_filename = \
|
||||||
acct_dir(base_dir, nickname, domain) + '/followers.txt'
|
acct_dir(base_dir, nickname, domain) + '/followers.txt'
|
||||||
|
|
Loading…
Reference in New Issue