This commit is contained in:
Benjamin Peterson 2016-12-28 20:03:23 -08:00
commit e70ca463eb
2 changed files with 4 additions and 1 deletions

View file

@ -245,7 +245,7 @@ random_seed(RandomObject *self, PyObject *args)
return NULL;
if (arg == NULL || arg == Py_None) {
if (random_seed_urandom(self) >= 0) {
if (random_seed_urandom(self) < 0) {
PyErr_Clear();
/* Reading system entropy failed, fall back on the worst entropy: