mirror of https://github.com/python/cpython
os.urandom no longer masks unrelated exceptions like SystemExit or
KeyboardInterrupt.
This commit is contained in:
parent
86e1e38059
commit
07fec3aa5a
|
@ -723,7 +723,7 @@ if not _exists("urandom"):
|
|||
"""
|
||||
try:
|
||||
_urandomfd = open("/dev/urandom", O_RDONLY)
|
||||
except:
|
||||
except (OSError, IOError):
|
||||
raise NotImplementedError("/dev/urandom (or equivalent) not found")
|
||||
bytes = ""
|
||||
while len(bytes) < n:
|
||||
|
|
Loading…
Reference in New Issue