Index: src/common/crypto.py =================================================================== --- src/common/crypto.py (revision 15338) +++ src/common/crypto.py (revision 15339) @@ -99,14 +99,14 @@ for d in dirs: if os.access(d, os.R_OK): - for filename in os.listdir(d): - OpenSSL.rand.add(filename, 0) - try: - with open(d + os.sep + filename, "r") as fp: - # Limit the ammount of read bytes, in case a memory - # file was opened - OpenSSL.rand.add(str(fp.read(5000)), 0.01) - except: - # Ignore all read and access errors - pass + for filename in os.listdir(d): + OpenSSL.rand.add(filename, 0) + try: + with open(d + os.sep + filename, "r") as fp: + # Limit the ammount of read bytes, in case a memory + # file was opened + OpenSSL.rand.add(str(fp.read(5000)), 1) + except IOError: + # Ignore all read and access errors + pass PYOPENSSL_PRNG_PRESENT = False Index: src/gajim.py =================================================================== --- src/gajim.py (revision 15338) +++ src/gajim.py (revision 15339) @@ -464,5 +464,5 @@ # Save the entropy from OpenSSL PRNG if PYOPENSSL_PRNG_PRESENT: - OpenSSL.rand.write_file(RNG_SEED) + OpenSSL.rand.write_file(str(RNG_SEED)) # delete pid file on normal exit if os.path.exists(pid_filename):