Patch #1021596: Check for None to determine whether _urandomfd is

uninitialized.
This commit is contained in:
Martin v. Löwis 2004-09-18 16:07:58 +00:00
parent b0c670ce39
commit 725f8c83a2

View file

@ -666,7 +666,7 @@ def urandom(n):
"""
global _urandomfd
if not _urandomfd:
if _urandomfd is None:
try:
_urandomfd = open("/dev/urandom", O_RDONLY)
except: