1
0
Fork 0
mirror of https://github.com/Lynnesbian/FediBooks/ synced 2024-11-25 08:38:59 +00:00

temporary print statement for debugging

This commit is contained in:
Lynne Megido 2020-01-20 12:15:27 +10:00
parent fa60a6569d
commit 6cfa9ef35f
Signed by: lynnesbian
GPG key ID: F0A184B5213D9F90

View file

@ -47,7 +47,7 @@ def bot_accounts_add(mysql, cfg):
else:
session['instance_type'] = "Mastodon"
session['step'] += 1
else:
error = "Unsupported instance type. Misskey support is planned."
return render_template("bot/accounts_add.html", error = error)
@ -81,12 +81,13 @@ def bot_accounts_add(mysql, cfg):
username = client.account_verify_credentials()['username']
if username != session['username']:
error = "Please authenticate as {}.".format(session['username'])
print("Auth error - {} is not {}".format(session['username'], username))
return render_template("bot/accounts_add.html", error = error)
except:
session['step'] = 1
error = "Authentication failed."
return render_template("bot/accounts_add.html", error = error)
# 1. download host-meta to find webfinger URL
r = requests.get("https://{}/.well-known/host-meta".format(session['instance']), timeout=10)
if r.status_code != 200: