From 62ee0859bc5f73ed1a46ea4c7c007432e9266e76 Mon Sep 17 00:00:00 2001 From: Wojtek Date: Thu, 12 Apr 2012 13:46:51 +0200 Subject: [PATCH] fixed random number generation in case of urandom absence --- gunicorn/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gunicorn/util.py b/gunicorn/util.py index d967e5d1..0e1f9f19 100644 --- a/gunicorn/util.py +++ b/gunicorn/util.py @@ -343,7 +343,7 @@ def seed(): try: random.seed(os.urandom(64)) except NotImplementedError: - random.seed(random.random()) + random.seed('%s.%s' % (time.time(), os.getpid())) def check_is_writeable(path):