mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 00:24:54 -04:00
replace 'except:' with 'except Exception:'
what could possibly go wrong
This commit is contained in:
parent
ecf198aab8
commit
eaaabc6c4f
54 changed files with 93 additions and 93 deletions
|
@ -52,7 +52,7 @@ class ProfileDisplaynameRestServlet(ClientV1RestServlet):
|
|||
|
||||
try:
|
||||
new_name = content["displayname"]
|
||||
except:
|
||||
except Exception:
|
||||
defer.returnValue((400, "Unable to parse name"))
|
||||
|
||||
yield self.profile_handler.set_displayname(
|
||||
|
@ -94,7 +94,7 @@ class ProfileAvatarURLRestServlet(ClientV1RestServlet):
|
|||
content = parse_json_object_from_request(request)
|
||||
try:
|
||||
new_name = content["avatar_url"]
|
||||
except:
|
||||
except Exception:
|
||||
defer.returnValue((400, "Unable to parse name"))
|
||||
|
||||
yield self.profile_handler.set_avatar_url(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue