From: Walter A. Boring IV Date: Wed, 4 Sep 2013 18:27:17 +0000 (-0700) Subject: Fixes brick Nova pep8 violation for lvm.py X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=9faa32599cf86c4111d0d6cd0a7c377061f2ee6d;p=openstack-build%2Fcinder-build.git 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 --- 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