mirror of
https://github.com/python/cpython.git
synced 2025-07-29 06:05:00 +00:00
os.urandom no longer masks unrelated exceptions like SystemExit or
KeyboardInterrupt.
This commit is contained in:
parent
86e1e38059
commit
07fec3aa5a
2 changed files with 4 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue