SF bug #1022010:  Import random fails

* trap NotImplementedError raised by os.urandom calls when not available
  on a particular system.
diff --git a/Lib/random.py b/Lib/random.py
index 0047c91..e6f6e4b 100644
--- a/Lib/random.py
+++ b/Lib/random.py
@@ -62,7 +62,8 @@
 try:
     from os import urandom as _urandom
     from binascii import hexlify as _hexlify
-except ImportError:
+    _urandom(1)                         # verify that urandom is implemented
+except (ImportError, NotImplementedError):
     _urandom = None