From: Martin v. Löwis Date: Sat, 18 Sep 2004 16:07:58 +0000 (+0000) Subject: Patch #1021596: Check for None to determine whether _urandomfd is X-Git-Tag: v2.4b1~242 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=725f8c83a27989ea2413c6d9c824cb78eddf52dd;p=python Patch #1021596: Check for None to determine whether _urandomfd is uninitialized. --- diff --git a/Lib/os.py b/Lib/os.py index 20746e8250..8839c10959 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: