summaryrefslogtreecommitdiff
path: root/oslo_vmware/objects
diff options
context:
space:
mode:
authorEric Brown <browne@vmware.com>2015-02-17 21:46:07 -0800
committerEric Brown <browne@vmware.com>2015-02-23 16:37:14 -0800
commit14339755ce04e046478f1f774038e182a549f40d (patch)
tree409db6368ef8bfe79390b08872682d3d93132b99 /oslo_vmware/objects
parente0a91246346c9e0ce70ee2eb6eb68b2cc94aa5e7 (diff)
downloadoslo-vmware-14339755ce04e046478f1f774038e182a549f40d.tar.gz
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
Diffstat (limited to 'oslo_vmware/objects')
-rw-r--r--oslo_vmware/objects/datastore.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/oslo_vmware/objects/datastore.py b/oslo_vmware/objects/datastore.py
index 234bf74..3d0188f 100644
--- a/oslo_vmware/objects/datastore.py
+++ b/oslo_vmware/objects/datastore.py
@@ -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):