mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +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
|
||||
if not _urandomfd:
|
||||
if _urandomfd is None:
|
||||
try:
|
||||
_urandomfd = open("/dev/urandom", O_RDONLY)
|
||||
except:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue