From cee89ee8bef92914036189d02745c08894a9955b Mon Sep 17 00:00:00 2001 From: caoyuan Date: Wed, 30 Nov 2016 03:55:13 +0800 Subject: Replaces uuid.uuid4 with uuidutils.generate_uuid() Openstack common has a wrapper for generating uuids. We should only use that function when generating uuids for consistency. Fixed bug #1082248 Change-Id: I9db4da4fb774109720abb0852fad30cc8e17aafb --- kolla/cmd/genpwd.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'kolla/cmd') diff --git a/kolla/cmd/genpwd.py b/kolla/cmd/genpwd.py index e548b9ab4..3cc013ee3 100755 --- a/kolla/cmd/genpwd.py +++ b/kolla/cmd/genpwd.py @@ -17,10 +17,10 @@ import os import random import string import sys -import uuid import yaml from Crypto.PublicKey import RSA +from oslo_utils import uuidutils # NOTE(SamYaple): Update the search path to prefer PROJECT_ROOT as the source # of packages to import if we are using local tools instead of @@ -81,7 +81,7 @@ def main(): if k in blank_keys and v is None: continue if k in uuid_keys: - passwords[k] = str(uuid.uuid4()) + passwords[k] = uuidutils.generate_uuid() else: passwords[k] = ''.join([ random.SystemRandom().choice( -- cgit v1.2.3