From 9faa32599cf86c4111d0d6cd0a7c377061f2ee6d Mon Sep 17 00:00:00 2001 From: "Walter A. Boring IV" Date: Wed, 4 Sep 2013 11:27:17 -0700 Subject: [PATCH] Fixes brick Nova pep8 violation for lvm.py Running pep8 tests in Nova gives a violation in lvm.py for not importing a module. This is a simple fix to import the module itself instead of only importing a function in the module. Fixes bug #1220849 Change-Id: Idc603dcfab18601dd4246c623d34be5933434f84 --- cinder/brick/local_dev/lvm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cinder/brick/local_dev/lvm.py b/cinder/brick/local_dev/lvm.py index b0d4a4d07..c55975fb6 100644 --- a/cinder/brick/local_dev/lvm.py +++ b/cinder/brick/local_dev/lvm.py @@ -22,7 +22,7 @@ LVM class for performing LVM operations. import math import re -from itertools import izip +import itertools from cinder.brick import exception from cinder.brick import executor @@ -169,7 +169,7 @@ class LVM(executor.Executor): lv_list = [] if out is not None: volumes = out.split() - for vg, name, size in izip(*[iter(volumes)] * 3): + for vg, name, size in itertools.izip(*[iter(volumes)] * 3): lv_list.append({"vg": vg, "name": name, "size": size}) return lv_list -- 2.45.2