Merge pull request #1562 from richboss/dev_urandom

don't write to /dev/urandom on Windows platforms
This commit is contained in:
mdipierro authored and GitHub committed 2017-01-30 12:47:50 -06:00
commit 930370ee91
1 file changed
+2
+2
View File
@@ -17,6 +17,7 @@ import random
import inspect
import time
import os
import sys
import re
import logging
import socket
@@ -299,6 +300,7 @@ def initialize_urandom():
try:
os.urandom(1)
have_urandom = True
if sys.platform != 'win32':
try:
# try to add process-specific entropy
frandom = open('/dev/urandom', 'wb')