summaryrefslogtreecommitdiffstats
path: root/Lib/os.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2012-02-20 23:33:36 (GMT)
committerGeorg Brandl <georg@python.org>2012-02-20 23:33:36 (GMT)
commit2fb477c0f0284439d40cb3f46eea45ef42446e53 (patch)
treec8df3747d511256d56ca4af046db7915b5c06096 /Lib/os.py
parentb5c793a0b349cb02003433c30a410595b224079f (diff)
parent9edceb3e591063f382ae82e14313813ffc1af0bf (diff)
downloadcpython-2fb477c0f0284439d40cb3f46eea45ef42446e53.zip
cpython-2fb477c0f0284439d40cb3f46eea45ef42446e53.tar.gz
cpython-2fb477c0f0284439d40cb3f46eea45ef42446e53.tar.bz2
Merge 3.2: Issue #13703 plus some related test suite fixes.
Diffstat (limited to 'Lib/os.py')
-rw-r--r--Lib/os.py17
1 files changed, 0 insertions, 17 deletions
diff --git a/Lib/os.py b/Lib/os.py
index 301870c..fe6cb11 100644
--- a/Lib/os.py
+++ b/Lib/os.py
@@ -852,23 +852,6 @@ try:
except NameError: # statvfs_result may not exist
pass
-if not _exists("urandom"):
- def urandom(n):
- """urandom(n) -> str
-
- Return a string of n random bytes suitable for cryptographic use.
-
- """
- try:
- _urandomfd = open("/dev/urandom", O_RDONLY)
- except (OSError, IOError):
- raise NotImplementedError("/dev/urandom (or equivalent) not found")
- bs = b""
- while len(bs) < n:
- bs += read(_urandomfd, n - len(bs))
- close(_urandomfd)
- return bs
-
# Supply os.popen()
def popen(cmd, mode="r", buffering=-1):
if not isinstance(cmd, str):