[Python-checkins] r51023 - in python/trunk: Lib/os.py Misc/NEWS
georg.brandl
python-checkins at python.org
Tue Aug 1 20:49:25 CEST 2006
Author: georg.brandl
Date: Tue Aug 1 20:49:24 2006
New Revision: 51023
Modified:
python/trunk/Lib/os.py
python/trunk/Misc/NEWS
Log:
os.urandom no longer masks unrelated exceptions like SystemExit or
KeyboardInterrupt.
Modified: python/trunk/Lib/os.py
==============================================================================
--- python/trunk/Lib/os.py (original)
+++ python/trunk/Lib/os.py Tue Aug 1 20:49:24 2006
@@ -723,7 +723,7 @@
"""
try:
_urandomfd = open("/dev/urandom", O_RDONLY)
- except:
+ except (OSError, IOError):
raise NotImplementedError("/dev/urandom (or equivalent) not found")
bytes = ""
while len(bytes) < n:
Modified: python/trunk/Misc/NEWS
==============================================================================
--- python/trunk/Misc/NEWS (original)
+++ python/trunk/Misc/NEWS Tue Aug 1 20:49:24 2006
@@ -61,6 +61,9 @@
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
More information about the Python-checkins
mailing list