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:
parent
fa60a6569d
commit
6cfa9ef35f
1 changed files with 3 additions and 2 deletions
|
@ -47,7 +47,7 @@ def bot_accounts_add(mysql, cfg):
|
||||||
else:
|
else:
|
||||||
session['instance_type'] = "Mastodon"
|
session['instance_type'] = "Mastodon"
|
||||||
session['step'] += 1
|
session['step'] += 1
|
||||||
|
|
||||||
else:
|
else:
|
||||||
error = "Unsupported instance type. Misskey support is planned."
|
error = "Unsupported instance type. Misskey support is planned."
|
||||||
return render_template("bot/accounts_add.html", error = error)
|
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']
|
username = client.account_verify_credentials()['username']
|
||||||
if username != session['username']:
|
if username != session['username']:
|
||||||
error = "Please authenticate as {}.".format(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)
|
return render_template("bot/accounts_add.html", error = error)
|
||||||
except:
|
except:
|
||||||
session['step'] = 1
|
session['step'] = 1
|
||||||
error = "Authentication failed."
|
error = "Authentication failed."
|
||||||
return render_template("bot/accounts_add.html", error = error)
|
return render_template("bot/accounts_add.html", error = error)
|
||||||
|
|
||||||
# 1. download host-meta to find webfinger URL
|
# 1. download host-meta to find webfinger URL
|
||||||
r = requests.get("https://{}/.well-known/host-meta".format(session['instance']), timeout=10)
|
r = requests.get("https://{}/.well-known/host-meta".format(session['instance']), timeout=10)
|
||||||
if r.status_code != 200:
|
if r.status_code != 200:
|
||||||
|
|
Loading…
Reference in a new issue