summaryrefslogtreecommitdiffstats
path: root/python/fatcat_web
diff options
context:
space:
mode:
Diffstat (limited to 'python/fatcat_web')
-rw-r--r--python/fatcat_web/auth.py10
-rw-r--r--python/fatcat_web/editing_routes.py16
2 files changed, 13 insertions, 13 deletions
diff --git a/python/fatcat_web/auth.py b/python/fatcat_web/auth.py
index 7f51b970..b815d816 100644
--- a/python/fatcat_web/auth.py
+++ b/python/fatcat_web/auth.py
@@ -20,7 +20,7 @@ def handle_token_login(token):
m = pymacaroons.Macaroon.deserialize(token)
except pymacaroons.exceptions.MacaroonDeserializationException:
# TODO: what kind of Exceptions?
- app.log.warn("auth fail: MacaroonDeserializationException")
+ app.log.warning("auth fail: MacaroonDeserializationException")
return abort(400)
# extract editor_id
editor_id = None
@@ -29,7 +29,7 @@ def handle_token_login(token):
if caveat.startswith(b"editor_id = "):
editor_id = caveat[12:].decode('utf-8')
if not editor_id:
- app.log.warn("auth fail: editor_id missing in macaroon")
+ app.log.warning("auth fail: editor_id missing in macaroon")
abort(400)
# fetch editor info
editor = api.get_editor(editor_id)
@@ -95,11 +95,11 @@ def handle_ia_xauth(email, password):
try:
flash("Internet Archive email/password didn't match: {}".format(resp.json()['values']['reason']))
except:
- app.log.warn("IA XAuth fail: {}".format(resp.content))
+ app.log.warning("IA XAuth fail: {}".format(resp.content))
return render_template('auth_ia_login.html', email=email), resp.status_code
elif resp.status_code != 200:
flash("Internet Archive login failed (internal error?)")
- app.log.warn("IA XAuth fail: {}".format(resp.content))
+ app.log.warning("IA XAuth fail: {}".format(resp.content))
return render_template('auth_ia_login.html', email=email), resp.status_code
# Successful login; now fetch info...
@@ -113,7 +113,7 @@ def handle_ia_xauth(email, password):
})
if resp.status_code != 200:
flash("Internet Archive login failed (internal error?)")
- app.log.warn("IA XAuth fail: {}".format(resp.content))
+ app.log.warning("IA XAuth fail: {}".format(resp.content))
return render_template('auth_ia_login.html', email=email), resp.status_code
ia_info = resp.json()['values']
diff --git a/python/fatcat_web/editing_routes.py b/python/fatcat_web/editing_routes.py
index f0b078b1..79a5bc3d 100644
--- a/python/fatcat_web/editing_routes.py
+++ b/python/fatcat_web/editing_routes.py
@@ -28,7 +28,7 @@ def form_editgroup_get_or_create(api, edit_form):
if ae.status == 404:
edit_form.editgroup_id.errors.append("Editgroup does not exist")
return None
- app.log.warn(ae)
+ app.log.warning(ae)
abort(ae.status)
# TODO: check here that editgroup hasn't been merged already
else:
@@ -37,7 +37,7 @@ def form_editgroup_get_or_create(api, edit_form):
eg = api.create_editgroup(
Editgroup(description=edit_form.editgroup_description.data or None))
except ApiException as ae:
- app.log.warn(ae)
+ app.log.warning(ae)
abort(ae.status)
# set this session editgroup_id
session['active_editgroup_id'] = eg.editgroup_id
@@ -62,7 +62,7 @@ def container_create():
try:
edit = user_api.create_container(entity, editgroup_id=eg.editgroup_id)
except ApiException as ae:
- app.log.warn(ae)
+ app.log.warning(ae)
abort(ae.status)
# redirect to new entity
return redirect('/container/{}'.format(edit.ident))
@@ -94,7 +94,7 @@ def container_edit(ident):
edit = user_api.update_container(entity.ident, entity,
editgroup_id=eg.editgroup_id)
except ApiException as ae:
- app.log.warn(ae)
+ app.log.warning(ae)
abort(ae.status)
# redirect to entity revision
# TODO: container_rev_view
@@ -131,7 +131,7 @@ def file_create():
try:
edit = user_api.create_file(entity, editgroup_id=eg.editgroup_id)
except ApiException as ae:
- app.log.warn(ae)
+ app.log.warning(ae)
abort(ae.status)
# redirect to new entity
return redirect('/file/{}'.format(edit.ident))
@@ -166,7 +166,7 @@ def file_edit(ident):
edit = user_api.update_file(entity.ident, entity,
editgroup_id=eg.editgroup_id)
except ApiException as ae:
- app.log.warn(ae)
+ app.log.warning(ae)
abort(ae.status)
# redirect to entity revision
# TODO: file_rev_view
@@ -210,7 +210,7 @@ def release_create():
try:
edit = user_api.create_release(entity, editgroup_id=eg.editgroup_id)
except ApiException as ae:
- app.log.warn(ae)
+ app.log.warning(ae)
abort(ae.status)
# redirect to new release
return redirect('/release/{}'.format(edit.ident))
@@ -243,7 +243,7 @@ def release_edit(ident):
edit = user_api.update_release(entity.ident, entity,
editgroup_id=eg.editgroup_id)
except ApiException as ae:
- app.log.warn(ae)
+ app.log.warning(ae)
abort(ae.status)
# redirect to entity revision
# TODO: release_rev_view