mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Patch #1021596: Check for None to determine whether _urandomfd is
uninitialized.
This commit is contained in:
parent
b0c670ce39
commit
725f8c83a2
1 changed files with 1 additions and 1 deletions
|
@ -666,7 +666,7 @@ if not _exists("urandom"):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
global _urandomfd
|
global _urandomfd
|
||||||
if not _urandomfd:
|
if _urandomfd is None:
|
||||||
try:
|
try:
|
||||||
_urandomfd = open("/dev/urandom", O_RDONLY)
|
_urandomfd = open("/dev/urandom", O_RDONLY)
|
||||||
except:
|
except:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue