summary refs log tree commit diff
path: root/synapse/secrets.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2018-08-06 13:33:54 +0100
committerErik Johnston <erik@matrix.org>2018-08-06 13:33:54 +0100
commit49a316395831a0676160833c39daa0bb63ceea09 (patch)
treef1c4db4121d7890a7ba390c01b0e81e329f09b22 /synapse/secrets.py
parentMerge branch 'release-v0.33.1' of github.com:matrix-org/synapse into matrix-o... (diff)
parentReturn M_NOT_FOUND when a profile could not be found. (#3596) (diff)
downloadsynapse-49a316395831a0676160833c39daa0bb63ceea09.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
Diffstat (limited to 'synapse/secrets.py')
-rw-r--r--synapse/secrets.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/synapse/secrets.py b/synapse/secrets.py

index f397daaa5e..f05e9ea535 100644 --- a/synapse/secrets.py +++ b/synapse/secrets.py
@@ -20,17 +20,16 @@ See https://docs.python.org/3/library/secrets.html#module-secrets for the API used in Python 3.6, and the API emulated in Python 2.7. """ -import six +import sys -if six.PY3: +# secrets is available since python 3.6 +if sys.version_info[0:2] >= (3, 6): import secrets def Secrets(): return secrets - else: - import os import binascii