diff options
author | Yann Leboulanger <asterix@lagaule.org> | 2015-01-05 23:45:42 +0300 |
---|---|---|
committer | Yann Leboulanger <asterix@lagaule.org> | 2015-01-05 23:45:42 +0300 |
commit | e694a9ad9b2d405ca39cf5dad9d342d67e012d5e (patch) | |
tree | 26b5f3c4d6ade7cfa84f9527949409be18da87d1 /src/gajim.py | |
parent | a5f50372c8840772545343ebc5539e6ccc486747 (diff) |
fix OpenSSL usage for py3. Fixes #7915
Diffstat (limited to 'src/gajim.py')
-rw-r--r-- | src/gajim.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gajim.py b/src/gajim.py index d9ad833fd..57e61e62e 100644 --- a/src/gajim.py +++ b/src/gajim.py @@ -339,7 +339,10 @@ try: except TypeError: OpenSSL.rand.load_file(RNG_SEED.encode('utf-8')) crypto.add_entropy_sources_OpenSSL() - OpenSSL.rand.write_file(str(RNG_SEED)) + try: + OpenSSL.rand.write_file(RNG_SEED) + except TypeError: + OpenSSL.rand.write_file(RNG_SEED.encode('utf-8')) except ImportError: log.info("PyOpenSSL PRNG not available") |