summaryrefslogtreecommitdiffstats
path: root/Lib/os.py
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2004-09-18 16:07:58 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2004-09-18 16:07:58 (GMT)
commit725f8c83a27989ea2413c6d9c824cb78eddf52dd (patch)
tree9045603898339366ef8c68d6b157d05ad3f72adc /Lib/os.py
parentb0c670ce398e7f8953b9a13ae0e40de6ef70d05f (diff)
downloadcpython-725f8c83a27989ea2413c6d9c824cb78eddf52dd.zip
cpython-725f8c83a27989ea2413c6d9c824cb78eddf52dd.tar.gz
cpython-725f8c83a27989ea2413c6d9c824cb78eddf52dd.tar.bz2
Patch #1021596: Check for None to determine whether _urandomfd is
uninitialized.
Diffstat (limited to 'Lib/os.py')
-rw-r--r--Lib/os.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/os.py b/Lib/os.py
index 20746e8..8839c10 100644
--- a/Lib/os.py
+++ b/Lib/os.py
@@ -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: