pylint W0404(reimported)

This commit is contained in:
Carlos Meza 2018-02-25 06:31:03 +00:00
parent 4e1864aa2b
commit d86f9e94b5
4 changed files with 3 additions and 6 deletions

View file

@ -82,7 +82,9 @@ class Volume(FSMProxy):
:raises VolumeError: When a free block device cannot be found.
"""
import os.path
import string
from bootstrapvz.common.fs import get_partitions
# Fetch information from /proc/partitions
proc_partitions = get_partitions()
device_name = os.path.basename(self.device_path)
@ -104,8 +106,7 @@ class Volume(FSMProxy):
major=device_partition['major'],
minor=device_partition['minor'],
start_sec=start_sector))
import string
import os.path
# Figure out the device letter and path
for letter in string.ascii_lowercase:
dev_name = 'vd' + letter

View file

@ -141,7 +141,6 @@ class WriteSources(Task):
@classmethod
def run(cls, info):
if not info.source_lists.target_exists(info.manifest.system['release']):
import logging
log = logging.getLogger(__name__)
log.warn('No default target has been specified in the sources list, '
'installing packages may fail')

View file

@ -4,7 +4,6 @@ assets = rel_path(__file__, 'assets')
def validate_manifest(data, validator, error):
from bootstrapvz.common.tools import rel_path
validator(data, rel_path(__file__, 'manifest-schema.yml'))

View file

@ -19,7 +19,6 @@ class CheckRequestedDebianRelease(Task):
@classmethod
def run(cls, info):
from bootstrapvz.common.exceptions import TaskError
if info.manifest.release not in (jessie, wheezy, stretch):
msg = 'Debian {info.manifest.release} is not (yet) available in the Puppetlabs.com APT repository.'
raise TaskError(msg)
@ -32,7 +31,6 @@ class CheckAssetsPath(Task):
@classmethod
def run(cls, info):
from bootstrapvz.common.exceptions import TaskError
assets = info.manifest.plugins['puppet']['assets']
if not os.path.exists(assets):
msg = 'The assets directory {assets} does not exist.'.format(assets=assets)