replace 'except:' with 'except Exception:'

what could possibly go wrong
This commit is contained in:
Richard van der Hoff 2017-10-23 15:52:32 +01:00
parent ecf198aab8
commit eaaabc6c4f
54 changed files with 93 additions and 93 deletions

View file

@ -238,7 +238,7 @@ class JoinRoomAliasServlet(ClientV1RestServlet):
try:
content = parse_json_object_from_request(request)
except:
except Exception:
# Turns out we used to ignore the body entirely, and some clients
# cheekily send invalid bodies.
content = {}
@ -247,7 +247,7 @@ class JoinRoomAliasServlet(ClientV1RestServlet):
room_id = room_identifier
try:
remote_room_hosts = request.args["server_name"]
except:
except Exception:
remote_room_hosts = None
elif RoomAlias.is_valid(room_identifier):
handler = self.handlers.room_member_handler
@ -587,7 +587,7 @@ class RoomMembershipRestServlet(ClientV1RestServlet):
try:
content = parse_json_object_from_request(request)
except:
except Exception:
# Turns out we used to ignore the body entirely, and some clients
# cheekily send invalid bodies.
content = {}