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: