diff options
-rw-r--r-- | Lib/os.py | 2 | ||||
-rw-r--r-- | Misc/NEWS | 3 |
2 files changed, 4 insertions, 1 deletions
@@ -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: @@ -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 |