summaryrefslogtreecommitdiff
path: root/Lib/os.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-08-01 18:49:24 +0000
committerGeorg Brandl <georg@python.org>2006-08-01 18:49:24 +0000
commit07fec3aa5a7c9fb6b1f8bae6bf6773892a702ea0 (patch)
tree75a1a8b215e3266dcfc0fd5bba2530709e276eae /Lib/os.py
parent86e1e38059c7f2a1d8bdc4123a1600bc7b7a0f79 (diff)
downloadcpython-git-07fec3aa5a7c9fb6b1f8bae6bf6773892a702ea0.tar.gz
os.urandom no longer masks unrelated exceptions like SystemExit or
KeyboardInterrupt.
Diffstat (limited to 'Lib/os.py')
-rw-r--r--Lib/os.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/os.py b/Lib/os.py
index 31002acb75..2d1b29b57b 100644
--- a/Lib/os.py
+++ b/Lib/os.py
@@ -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: