Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Only import secrets when available #3626

Merged

Conversation

krombel
Copy link
Contributor

@krombel krombel commented Jul 30, 2018

secrets got introduced in python 3.6 so this class is not available
in 3.5 and before.

This now checks for the current running version and only tries using
secrets if the version is 3.6 or above

This fixes an import error for synapse running e.g. on 3.5

Signed-Off-By: Matthias Kesler [email protected]

@matrixbot
Copy link
Member

Can one of the admins verify this patch?

1 similar comment
@matrixbot
Copy link
Member

Can one of the admins verify this patch?

secrets got introduced in python 3.6 so this class is not available
in 3.5 and before.

This now checks for the current running version and only tries using
secrets if the version is 3.6 or above

Signed-Off-By: Matthias Kesler <[email protected]>
@krombel krombel force-pushed the only_import_secrets_when_available branch from 868133f to 254e826 Compare July 30, 2018 21:59
@hawkowl
Copy link
Contributor

hawkowl commented Jul 30, 2018

matrixbot: test this please

@hawkowl hawkowl merged commit 52384f2 into matrix-org:develop Jul 30, 2018
@krombel krombel deleted the only_import_secrets_when_available branch July 31, 2018 11:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants