Change use of random to random.SystemRandom

There's no reason to use random directly unless the code really
requires a pseudo-random number generator. This is for security
hardening and identified by the security static analysis project
called Bandit.

SecImpact

Change-Id: I6b5fdd8ab17ec6ed2cb8c195bee1fb5da0e90e9f
This commit is contained in:
Eric Brown 2015-02-17 21:46:07 -08:00
parent e0a9124634
commit 14339755ce

View File

@ -14,7 +14,7 @@
import logging
import posixpath
import random
import random as _random
import six.moves.http_client as httplib
import six.moves.urllib.parse as urlparse
@ -25,6 +25,7 @@ from oslo_vmware import exceptions
from oslo_vmware import vim_util
LOG = logging.getLogger(__name__)
random = _random.SystemRandom()
class Datastore(object):