diff --git a/diskimage_builder/block_device/__init__.py b/diskimage_builder/block_device/__init__.py index 543ad005..0d5bb352 100644 --- a/diskimage_builder/block_device/__init__.py +++ b/diskimage_builder/block_device/__init__.py @@ -13,9 +13,10 @@ # under the License. import argparse +import logging + from diskimage_builder.block_device.blockdevice import BlockDevice from diskimage_builder import logging_config -import logging def generate_phase_doc(): diff --git a/diskimage_builder/block_device/blockdevice.py b/diskimage_builder/block_device/blockdevice.py index 9f2958eb..769b9fa2 100644 --- a/diskimage_builder/block_device/blockdevice.py +++ b/diskimage_builder/block_device/blockdevice.py @@ -13,17 +13,19 @@ # under the License. import codecs -from diskimage_builder.block_device.blockdevicesetupexception \ - import BlockDeviceSetupException -from diskimage_builder.graph.digraph import Digraph import json import logging import os import shutil -from stevedore import extension import sys import yaml +from stevedore import extension + +from diskimage_builder.block_device.blockdevicesetupexception \ + import BlockDeviceSetupException +from diskimage_builder.graph.digraph import Digraph + logger = logging.getLogger(__name__) diff --git a/diskimage_builder/block_device/level0/localloop.py b/diskimage_builder/block_device/level0/localloop.py index f54fa95c..78cf5559 100644 --- a/diskimage_builder/block_device/level0/localloop.py +++ b/diskimage_builder/block_device/level0/localloop.py @@ -12,15 +12,16 @@ # License for the specific language governing permissions and limitations # under the License. +import logging +import os +import subprocess + from diskimage_builder.block_device.blockdevicesetupexception \ import BlockDeviceSetupException from diskimage_builder.block_device.plugin_base import NodePluginBase from diskimage_builder.block_device.tree_config import TreeConfig from diskimage_builder.block_device.utils import parse_abs_size_spec from diskimage_builder.graph.digraph import Digraph -import logging -import os -import subprocess logger = logging.getLogger(__name__) diff --git a/diskimage_builder/block_device/level1/mbr.py b/diskimage_builder/block_device/level1/mbr.py index 65b108b3..69cff736 100644 --- a/diskimage_builder/block_device/level1/mbr.py +++ b/diskimage_builder/block_device/level1/mbr.py @@ -13,6 +13,8 @@ # under the License. import logging import random + + from struct import pack diff --git a/diskimage_builder/block_device/level1/partitioning.py b/diskimage_builder/block_device/level1/partitioning.py index 98286e24..72dc9e47 100644 --- a/diskimage_builder/block_device/level1/partitioning.py +++ b/diskimage_builder/block_device/level1/partitioning.py @@ -12,6 +12,11 @@ # License for the specific language governing permissions and limitations # under the License. +import logging +import os + +from subprocess import CalledProcessError + from diskimage_builder.block_device.blockdevicesetupexception \ import BlockDeviceSetupException from diskimage_builder.block_device.level1.mbr import MBR @@ -21,9 +26,7 @@ from diskimage_builder.block_device.utils import exec_sudo from diskimage_builder.block_device.utils import parse_abs_size_spec from diskimage_builder.block_device.utils import parse_rel_size_spec from diskimage_builder.graph.digraph import Digraph -import logging -import os -from subprocess import CalledProcessError + logger = logging.getLogger(__name__) diff --git a/diskimage_builder/block_device/plugin_base.py b/diskimage_builder/block_device/plugin_base.py index c92ff77c..29cbdc17 100644 --- a/diskimage_builder/block_device/plugin_base.py +++ b/diskimage_builder/block_device/plugin_base.py @@ -13,9 +13,10 @@ # under the License. import abc -from diskimage_builder.graph.digraph import Digraph import six +from diskimage_builder.graph.digraph import Digraph + @six.add_metaclass(abc.ABCMeta) class PluginBase(object): diff --git a/diskimage_builder/block_device/tests/test_utils.py b/diskimage_builder/block_device/tests/test_utils.py index 570c7265..9e98586a 100644 --- a/diskimage_builder/block_device/tests/test_utils.py +++ b/diskimage_builder/block_device/tests/test_utils.py @@ -12,9 +12,10 @@ # License for the specific language governing permissions and limitations # under the License. -from diskimage_builder.block_device.utils import parse_abs_size_spec import testtools +from diskimage_builder.block_device.utils import parse_abs_size_spec + class TestLoggingConfig(testtools.TestCase):