0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-07-09 12:48:49 +02:00
synapse/changelog.d/9985.misc
Dan Callahan bd918d874f
Simplify exception handling in is_ascii. (#9985)
We can get away with just catching UnicodeError here.

    ⋮
    +-- ValueError
    |    +-- UnicodeError
    |         +-- UnicodeDecodeError
    |         +-- UnicodeEncodeError
    |         +-- UnicodeTranslateError
    ⋮

https://docs.python.org/3/library/exceptions.html#exception-hierarchy

Signed-off-by: Dan Callahan <danc@element.io>
2021-05-14 10:58:52 +01:00

2 lines
33 B
Plaintext

Simplify a few helper functions.