[fix] remove bare exceptions

This commit is contained in:
Laurent Peuch 2021-06-21 04:09:00 +02:00
parent 68366fa685
commit 5942a582f5
2 changed files with 4 additions and 4 deletions

View file

@ -479,7 +479,7 @@ class ExtendedArgumentParser(argparse.ArgumentParser):
c.execute(namespace, v)
try:
delattr(namespace, CALLBACKS_PROP)
except:
except Exception:
pass
def _get_callbacks_queue(self, namespace, create=True):

View file

@ -358,7 +358,7 @@ class _ActionsMapPlugin(object):
# Retrieve session values
try:
s_id = request.get_cookie("session.id") or random_ascii()
except:
except Exception:
# Super rare case where there are super weird cookie / cache issue
# Previous line throws a CookieError that creates a 500 error ...
# So let's catch it and just use a fresh ID then...
@ -371,7 +371,7 @@ class _ActionsMapPlugin(object):
else:
try:
s_tokens = request.get_cookie("session.tokens", secret=s_secret) or {}
except:
except Exception:
# Same as for session.id a few lines before
s_tokens = {}
s_new_token = random_ascii()
@ -384,7 +384,7 @@ class _ActionsMapPlugin(object):
if len(s_tokens) > 0:
try:
self.logout(profile)
except:
except Exception:
pass
raise HTTPResponse(e.strerror, 401)
else: