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: