cpython: 2e8b01583839 (original) (raw)
Mercurial > cpython
changeset 78873:2e8b01583839 3.2
Issue #15340: Fix importing the random module when /dev/urandom cannot be opened. This was a regression caused by the hash randomization patch. [#15340]
Antoine Pitrou solipsis@pitrou.net | |
---|---|
date | Fri, 07 Sep 2012 23:49:07 +0200 |
parents | abb858a0740f |
children | a53fc9982e2a df663603e67a |
files | Misc/NEWS Python/random.c |
diffstat | 2 files changed, 5 insertions(+), 1 deletions(-)[+] [-] Misc/NEWS 3 Python/random.c 3 |
line wrap: on
line diff
--- a/Misc/NEWS +++ b/Misc/NEWS @@ -120,6 +120,9 @@ Core and Builtins Library ------- +- Issue #15340: Fix importing the random module when /dev/urandom cannot
- Issue #15841: The readable(), writable() and seekable() methods of BytesIO and StringIO objects now raise ValueError when the object has been closed. Patch by Alessandro Moura.
--- a/Python/random.c +++ b/Python/random.c @@ -165,7 +165,8 @@ dev_urandom_python(char *buffer, Py_ssiz Py_END_ALLOW_THREADS if (fd < 0) {
PyErr_SetFromErrnoWithFilename(PyExc_OSError, "/dev/urandom");[](#l2.7)