cpython: a53fc9982e2a (original) (raw)
Mercurial > cpython
changeset 78874:a53fc9982e2a
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:51:22 +0200 |
parents | c82e3a6553fc(current diff)2e8b01583839(diff) |
children | 90c8fa612e5b |
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 @@ -88,6 +88,9 @@ Core and Builtins Library ------- +- Issue #15340: Fix importing the random module when /dev/urandom cannot
- Issue #15828: Restore support for C extensions in imp.load_module()
- Issue #10650: Deprecate the watchexp parameter of the Decimal.quantize()
--- 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)