mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +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:
|
try:
|
||||||
_urandomfd = open("/dev/urandom", O_RDONLY)
|
_urandomfd = open("/dev/urandom", O_RDONLY)
|
||||||
except:
|
except (OSError, IOError):
|
||||||
raise NotImplementedError("/dev/urandom (or equivalent) not found")
|
raise NotImplementedError("/dev/urandom (or equivalent) not found")
|
||||||
bytes = ""
|
bytes = ""
|
||||||
while len(bytes) < n:
|
while len(bytes) < n:
|
||||||
|
|
|
||||||
|
|
@ -61,6 +61,9 @@ Core and builtins
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
- os.urandom no longer masks unrelated exceptions like SystemExit or
|
||||||
|
KeyboardInterrupt.
|
||||||
|
|
||||||
- Bug #1525866: Don't copy directory stat times in
|
- Bug #1525866: Don't copy directory stat times in
|
||||||
shutil.copytree on Windows
|
shutil.copytree on Windows
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue