summaryrefslogtreecommitdiffstats
path: root/python/fatcat_web
diff options
context:
space:
mode:
authorMartin Czygan <martin@archive.org>2021-05-28 20:18:46 +0000
committerMartin Czygan <martin@archive.org>2021-05-28 20:18:46 +0000
commit6a0a25e219f39530efeefd136c7abc298c89388d (patch)
tree1e318f5251429df0d2d7a8649beb57bfb0fe81b3 /python/fatcat_web
parenta7a3cc1f8de8f38d98cf878282bd26ec4d76771f (diff)
parent064b05a2f49138a1708416b9fc1ac25c29a858ef (diff)
downloadfatcat-6a0a25e219f39530efeefd136c7abc298c89388d.tar.gz
fatcat-6a0a25e219f39530efeefd136c7abc298c89388d.zip
Merge branch 'bnewbold-lint-fixes' into 'master'
various lint fixes; should un-break CI See merge request webgroup/fatcat!106
Diffstat (limited to 'python/fatcat_web')
-rw-r--r--python/fatcat_web/auth.py6
-rw-r--r--python/fatcat_web/routes.py2
2 files changed, 4 insertions, 4 deletions
diff --git a/python/fatcat_web/auth.py b/python/fatcat_web/auth.py
index 74b8e2d6..73869544 100644
--- a/python/fatcat_web/auth.py
+++ b/python/fatcat_web/auth.py
@@ -36,7 +36,7 @@ def handle_token_login(token):
abort(400)
# fetch editor info
editor = api.get_editor(editor_id)
- session.permanent = True
+ session.permanent = True # pylint: disable=assigning-non-slot
session['api_token'] = token
session['editor'] = editor.to_dict()
login_user(load_user(editor.editor_id))
@@ -76,7 +76,7 @@ def handle_oauth(remote, token, user_info):
api_token = resp.token
# write token and username to session
- session.permanent = True
+ session.permanent = True # pylint: disable=assigning-non-slot
session['api_token'] = api_token
session['editor'] = editor.to_dict()
@@ -104,7 +104,7 @@ def handle_ia_xauth(email, password):
if resp.status_code == 401 or (not resp.json().get('success')):
try:
flash("Internet Archive email/password didn't match: {}".format(resp.json()['values']['reason']))
- except:
+ except Exception:
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:
diff --git a/python/fatcat_web/routes.py b/python/fatcat_web/routes.py
index 7cf1f854..1a573006 100644
--- a/python/fatcat_web/routes.py
+++ b/python/fatcat_web/routes.py
@@ -658,7 +658,7 @@ def release_save(ident):
Config.KAFKA_SAVEPAPERNOW_TOPIC,
json.dumps(msg, sort_keys=True),
)
- except:
+ except Exception:
return render_template('release_save.html', entity=release, form=form, spn_status='kafka-error'), 500
return render_template('release_save.html', entity=release, form=form, spn_status='success'), 200
elif form.errors: