Blame 00171-raise-correct-exception-when-dev-urandom-is-missing.patch

c9c381
diff -up Python-2.7.3/Misc/NEWS.raise-correct-exception-when-dev-urandom-is-missing Python-2.7.3/Misc/NEWS
c9c381
diff -up Python-2.7.3/Python/random.c.raise-correct-exception-when-dev-urandom-is-missing Python-2.7.3/Python/random.c
c9c381
--- Python-2.7.3/Python/random.c.raise-correct-exception-when-dev-urandom-is-missing	2012-04-09 19:07:35.000000000 -0400
c9c381
+++ Python-2.7.3/Python/random.c	2013-02-21 14:39:01.020988043 -0500
c9c381
@@ -165,7 +165,8 @@ dev_urandom_python(char *buffer, Py_ssiz
c9c381
     Py_END_ALLOW_THREADS
c9c381
     if (fd < 0)
c9c381
     {
c9c381
-        PyErr_SetFromErrnoWithFilename(PyExc_OSError, "/dev/urandom");
c9c381
+        PyErr_SetString(PyExc_NotImplementedError,
c9c381
+                        "/dev/urandom (or equivalent) not found");
c9c381
         return -1;
c9c381
     }
c9c381