From 5e1631286dc5985ba438c7b36048572196029473 Mon Sep 17 00:00:00 2001 From: Bofh Date: Mon, 8 Feb 2021 10:56:34 +0100 Subject: [PATCH] Fix bug --- igmirror.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/igmirror.py b/igmirror.py index 7a2d520..7149b0d 100644 --- a/igmirror.py +++ b/igmirror.py @@ -280,6 +280,8 @@ def pixelfed_setpic(acc_id, pic_url, count=0): return True def pixelfed_setinfo(acc_id, bio, website, count=0): + accdata = db_get('accounts', acc_id) + name = accdata['name'] if count == 0: bio = 'Mirrored from Instagram: https://www.instagram.com/{} | {}'.format(acc_id, bio) @@ -288,7 +290,6 @@ def pixelfed_setinfo(acc_id, bio, website, count=0): count += 1 pixelfed_login(acc_id) - accdata = db_get('accounts', acc_id) print('I| setting account-info for "{}" '.format(acc_id), end="") _, _token = pixelfed_token_url('/settings/home', accdata['cookie']) r = requests.post( 'https://'+config()['instance']+'/settings/home',\