From e9d49358e449a6d90080a6a621681750bb0f49a5 Mon Sep 17 00:00:00 2001 From: Takashi NATSUME Date: Thu, 25 Feb 2016 16:47:13 +0900 Subject: [PATCH] Remove unused methods in nova/utils.py Remove the following unused methods in nova/utils.py. * novadir It has not been used since Id384d0e8d350fdd68ed03c83b94f6e558d53eb28. * convert_to_list_dict It has not been used since I8bf7cbaa7015bb61656ab90ccc8f944aaeebb095. TrivialFix Change-Id: Ife5acadf1c2979d56a19ce117c78203f9ab4137d --- nova/utils.py | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/nova/utils.py b/nova/utils.py index 98012104ef..6367fdbe49 100644 --- a/nova/utils.py +++ b/nova/utils.py @@ -408,11 +408,6 @@ def trycmd(*args, **kwargs): return processutils.trycmd(*args, **kwargs) -def novadir(): - import nova - return os.path.abspath(nova.__file__).split('nova/__init__.py')[0] - - def generate_uid(topic, size=8): characters = '01234567890abcdefghijklmnopqrstuvwxyz' choices = [random.choice(characters) for _x in range(size)] @@ -749,15 +744,6 @@ def monkey_patch(): decorator("%s.%s" % (module, key), func)) -def convert_to_list_dict(lst, label): - """Convert a value or list into a list of dicts.""" - if not lst: - return None - if not isinstance(lst, list): - lst = [lst] - return [{label: x} for x in lst] - - def make_dev_path(dev, partition=None, base='/dev'): """Return a path to a particular device.