summary refs log tree commit diff
path: root/synapse/util/stringutils.py
diff options
context:
space:
mode:
authorMichael Kaye <1917473+michaelkaye@users.noreply.github.com>2018-06-22 17:04:50 +0100
committerMichael Kaye <1917473+michaelkaye@users.noreply.github.com>2018-06-22 17:04:50 +0100
commitfe265fe990f6aa158be346b8a394f298f1420323 (patch)
tree774cb2e05dc3cd34ed0b326d2c99c8e08e6f7a7f /synapse/util/stringutils.py
parentMerge pull request #3426 from matrix-org/dbkr/e2e_by_default (diff)
parentlink to spec proposal from changelog (diff)
downloadsynapse-fe265fe990f6aa158be346b8a394f298f1420323.tar.xz
Merge tag 'v0.31.2' into dinsic
Diffstat (limited to '')
-rw-r--r--synapse/util/stringutils.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/util/stringutils.py b/synapse/util/stringutils.py

index 95a6168e16..b98b9dc6e4 100644 --- a/synapse/util/stringutils.py +++ b/synapse/util/stringutils.py
@@ -15,6 +15,7 @@ import random import string +from six.moves import range _string_with_symbols = ( string.digits + string.ascii_letters + ".,;:^&*-_+=#~@" @@ -22,12 +23,12 @@ _string_with_symbols = ( def random_string(length): - return ''.join(random.choice(string.ascii_letters) for _ in xrange(length)) + return ''.join(random.choice(string.ascii_letters) for _ in range(length)) def random_string_with_symbols(length): return ''.join( - random.choice(_string_with_symbols) for _ in xrange(length) + random.choice(_string_with_symbols) for _ in range(length) )