os.urandom no longer masks unrelated exceptions like SystemExit or

KeyboardInterrupt.
This commit is contained in:
Georg Brandl 2006-08-01 18:49:24 +00:00
parent 86e1e38059
commit 07fec3aa5a
2 changed files with 4 additions and 1 deletions

View File

@ -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:

View File

@ -61,6 +61,9 @@ Core and builtins
Library
-------
- os.urandom no longer masks unrelated exceptions like SystemExit or
KeyboardInterrupt.
- Bug #1525866: Don't copy directory stat times in
shutil.copytree on Windows