mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
[fix] remove bare exceptions
This commit is contained in:
parent
68366fa685
commit
5942a582f5
2 changed files with 4 additions and 4 deletions
|
@ -479,7 +479,7 @@ class ExtendedArgumentParser(argparse.ArgumentParser):
|
||||||
c.execute(namespace, v)
|
c.execute(namespace, v)
|
||||||
try:
|
try:
|
||||||
delattr(namespace, CALLBACKS_PROP)
|
delattr(namespace, CALLBACKS_PROP)
|
||||||
except:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def _get_callbacks_queue(self, namespace, create=True):
|
def _get_callbacks_queue(self, namespace, create=True):
|
||||||
|
|
|
@ -358,7 +358,7 @@ class _ActionsMapPlugin(object):
|
||||||
# Retrieve session values
|
# Retrieve session values
|
||||||
try:
|
try:
|
||||||
s_id = request.get_cookie("session.id") or random_ascii()
|
s_id = request.get_cookie("session.id") or random_ascii()
|
||||||
except:
|
except Exception:
|
||||||
# Super rare case where there are super weird cookie / cache issue
|
# Super rare case where there are super weird cookie / cache issue
|
||||||
# Previous line throws a CookieError that creates a 500 error ...
|
# Previous line throws a CookieError that creates a 500 error ...
|
||||||
# So let's catch it and just use a fresh ID then...
|
# So let's catch it and just use a fresh ID then...
|
||||||
|
@ -371,7 +371,7 @@ class _ActionsMapPlugin(object):
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
s_tokens = request.get_cookie("session.tokens", secret=s_secret) or {}
|
s_tokens = request.get_cookie("session.tokens", secret=s_secret) or {}
|
||||||
except:
|
except Exception:
|
||||||
# Same as for session.id a few lines before
|
# Same as for session.id a few lines before
|
||||||
s_tokens = {}
|
s_tokens = {}
|
||||||
s_new_token = random_ascii()
|
s_new_token = random_ascii()
|
||||||
|
@ -384,7 +384,7 @@ class _ActionsMapPlugin(object):
|
||||||
if len(s_tokens) > 0:
|
if len(s_tokens) > 0:
|
||||||
try:
|
try:
|
||||||
self.logout(profile)
|
self.logout(profile)
|
||||||
except:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
raise HTTPResponse(e.strerror, 401)
|
raise HTTPResponse(e.strerror, 401)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Reference in a new issue