Commit 653ecbdd authored by Romain Loth's avatar Romain Loth

minor cleanup

parent 3cb3f8c4
......@@ -532,7 +532,6 @@ def claim_profile():
if 'token' in request.args:
return_token = sanitize(request.args['token'])
print("clean token", return_token)
if (return_token
and type(return_token) == str
......@@ -547,7 +546,7 @@ def claim_profile():
# claim failure cases
if return_token is None or luid is None or return_user is None:
mlog('INFO', 'failed claim profile attempt with return_token=%s, luid=%s' % (str(return_token),str(luid)))
mlog('INFO', 'failed claim profile GET with return_token=%s, luid=%s' % (str(return_token),str(luid)))
return render_template(
"message.html",
message = """
......@@ -560,7 +559,7 @@ def claim_profile():
# claim success
else:
mlog('INFO', "successful claim_profile attempt with luid =", luid)
mlog('DEBUG', "successful claim_profile GET for luid =", luid)
# we *don't* log him in but we do put his data as return_user
# => this way we can use templating to show the data
return render_template(
......@@ -619,6 +618,8 @@ def claim_profile():
debug_message = tools.format_err(perr)
)
mlog('DEBUG', "successful claim_profile for luid =", luid)
return render_template(
"message.html",
message = "Your new login credentials are saved. To complete your registration, just click the link in the confirmation email you should receive."
......
......@@ -70,7 +70,6 @@ def jsonize_uinfo(uinfo_dict):
if type(v) not in [date, datetime]:
raise TypeError("Incorrect type for %s field: /%s/ instead of date or datetime" % (k, type(v)))
else:
print("toto")
serializable_dict[k] = v.isoformat()
# date "YYYY-MM-DD"
# datetime "YYYY-MM-DDTHH:MM:SS"
......@@ -286,7 +285,7 @@ def doors_register(email, password, name, config=REALCONFIG):
# eg doors_response.content = b'{"status":"registration email sent",
# "email":"john@locke.com"}''
answer = loads(doors_response.content.decode())
mlog("INFO", "/api/register answer",answer)
# mlog("INFO", "/api/register answer",answer)
return answer['userID']
else:
return None
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment