]> granicus.if.org Git - python/commitdiff
Patch #1021596: Check for None to determine whether _urandomfd is
authorMartin v. Löwis <martin@v.loewis.de>
Sat, 18 Sep 2004 16:07:58 +0000 (16:07 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Sat, 18 Sep 2004 16:07:58 +0000 (16:07 +0000)
uninitialized.

Lib/os.py

index 20746e8250058477042ee8ea182ff775be80cac3..8839c109596d1b644583459726e514ba855e26d5 100644 (file)
--- 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: