mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
fixed random number generation in case of urandom absence
This commit is contained in:
parent
1215af30e4
commit
62ee0859bc
@ -343,7 +343,7 @@ def seed():
|
|||||||
try:
|
try:
|
||||||
random.seed(os.urandom(64))
|
random.seed(os.urandom(64))
|
||||||
except NotImplementedError:
|
except NotImplementedError:
|
||||||
random.seed(random.random())
|
random.seed('%s.%s' % (time.time(), os.getpid()))
|
||||||
|
|
||||||
|
|
||||||
def check_is_writeable(path):
|
def check_is_writeable(path):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user