commit | 380c55cc58911a4777f080744f596d1e96fd2357 | [log] [tgz] |
---|---|---|
author | Antoine Pitrou <solipsis@pitrou.net> | Fri Sep 07 23:49:07 2012 +0200 |
committer | Antoine Pitrou <solipsis@pitrou.net> | Fri Sep 07 23:49:07 2012 +0200 |
tree | f68d1b5d4e28c98b865ac0a06a965973f40057d8 | |
parent | 0398985920dcad1fcff0859e18a5911a6c685ff1 [diff] [blame] |
Issue #15340: Fix importing the random module when /dev/urandom cannot be opened. This was a regression caused by the hash randomization patch.
diff --git a/Python/random.c b/Python/random.c index 7019a35..53518c2 100644 --- a/Python/random.c +++ b/Python/random.c
@@ -165,7 +165,8 @@ Py_END_ALLOW_THREADS if (fd < 0) { - PyErr_SetFromErrnoWithFilename(PyExc_OSError, "/dev/urandom"); + PyErr_SetString(PyExc_NotImplementedError, + "/dev/urandom (or equivalent) not found"); return -1; }