Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion taiga/base/api/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ def _parse(self):

try:
parsed = parser.parse(stream, media_type, self.parser_context)
except:
except Exception:
# If we get an exception during parsing, fill in empty data and
# re-raise. Ensures we don't simply repeat the error when
# attempting to render the browsable renderer response, or when
Expand Down
2 changes: 1 addition & 1 deletion taiga/base/api/utils/encoders.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def default(self, o):
elif hasattr(o, "__getitem__"):
try:
return dict(o)
except:
except Exception:
pass
elif hasattr(o, "__iter__"):
return [i for i in o]
Expand Down
6 changes: 3 additions & 3 deletions taiga/base/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def filter_queryset(self, request, queryset, view):
"project" in request.QUERY_PARAMS):
try:
project_id = int(request.QUERY_PARAMS["project"])
except:
except Exception:
logger.error("Filtering project diferent value than an integer: {}".format(
request.QUERY_PARAMS["project"]
))
Expand Down Expand Up @@ -268,7 +268,7 @@ def filter_queryset(self, request, queryset, view):
if "project" in request.QUERY_PARAMS:
try:
project_id = int(request.QUERY_PARAMS["project"])
except:
except Exception:
logger.error("Filtering project diferent value than an integer: {}".format(
request.QUERY_PARAMS["project"]))
raise exc.BadRequest(_("'project' must be an integer value."))
Expand Down Expand Up @@ -388,7 +388,7 @@ def _prepare_filter_data(self, query_param_value):
def _transform_value(value):
try:
return int(value)
except:
except Exception:
if value in self._special_values_dict:
return self._special_values_dict[value]
raise exc.BadRequest()
Expand Down
2 changes: 1 addition & 1 deletion taiga/importers/github/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ def get_access_token(cls, client_id, client_secret, code):
else:
try:
return dict(parse_qsl(result.content))[b'access_token'].decode('utf-8')
except:
except Exception:
raise InvalidAuthResult()


Expand Down
2 changes: 1 addition & 1 deletion taiga/importers/trello/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def list_users(self, project_id):
avatar = 'https://www.gravatar.com/avatar/' + user['gravatarHash'] + '.jpg?s=50'
elif user['avatarHash'] is not None:
avatar = 'https://trello-members.s3.amazonaws.com/' + user['id'] + '/' + user['avatarHash'] + '/50.png'
except:
except Exception:
# NOTE: Sometimes this piece of code return this exception:
#
# File "/home/taiga/taiga-back/taiga/importers/trello/importer.py" in list_users
Expand Down
2 changes: 1 addition & 1 deletion taiga/projects/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def filter_queryset(self, request, queryset, view):
"project" in request.QUERY_PARAMS):
try:
project_id = int(request.QUERY_PARAMS["project"])
except:
except Exception:
logger.error("Filtering project diferent value than an integer: {}".format(
request.QUERY_PARAMS["project"]
))
Expand Down
2 changes: 1 addition & 1 deletion taiga/projects/references/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def list(self, request, **kwargs):
issue = project.issues.filter(ref=value).first()
if issue:
result["issue"] = issue.pk
except:
except Exception:
value = data["ref"]

if user_has_perm(request.user, "view_wiki_pages", project):
Expand Down