diff options
author | Brendan Abolivier <babolivier@matrix.org> | 2019-09-19 12:03:10 +0100 |
---|---|---|
committer | Brendan Abolivier <babolivier@matrix.org> | 2019-09-19 12:03:10 +0100 |
commit | 30c085fbc33e7ad47c31f28debd23bacaf41b599 (patch) | |
tree | 7c7c01553364b48f99e1091c8b4e31520b97ef86 /test_postgresql.sh | |
parent | Add unit tests for strip_invalid_mxid_characters (diff) | |
download | synapse-30c085fbc33e7ad47c31f28debd23bacaf41b599.tar.xz |
Use six.moves.filter when filtering out from MXID
Python 2's filter() function and Python 3's don't return the same type when processing a string (respectively str and filter), therefore use six's compatibility mapping (which resolves to itertools.ifilter() if using Python2), then generate a string from the filtered list, in order to ensure consistent behaviour between Python 2 and Python 3.
Diffstat (limited to 'test_postgresql.sh')
0 files changed, 0 insertions, 0 deletions