mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 07:26:29 +00:00
pylint W0404(reimported)
This commit is contained in:
parent
4e1864aa2b
commit
d86f9e94b5
4 changed files with 3 additions and 6 deletions
|
@ -82,7 +82,9 @@ class Volume(FSMProxy):
|
||||||
:raises VolumeError: When a free block device cannot be found.
|
:raises VolumeError: When a free block device cannot be found.
|
||||||
"""
|
"""
|
||||||
import os.path
|
import os.path
|
||||||
|
import string
|
||||||
from bootstrapvz.common.fs import get_partitions
|
from bootstrapvz.common.fs import get_partitions
|
||||||
|
|
||||||
# Fetch information from /proc/partitions
|
# Fetch information from /proc/partitions
|
||||||
proc_partitions = get_partitions()
|
proc_partitions = get_partitions()
|
||||||
device_name = os.path.basename(self.device_path)
|
device_name = os.path.basename(self.device_path)
|
||||||
|
@ -104,8 +106,7 @@ class Volume(FSMProxy):
|
||||||
major=device_partition['major'],
|
major=device_partition['major'],
|
||||||
minor=device_partition['minor'],
|
minor=device_partition['minor'],
|
||||||
start_sec=start_sector))
|
start_sec=start_sector))
|
||||||
import string
|
|
||||||
import os.path
|
|
||||||
# Figure out the device letter and path
|
# Figure out the device letter and path
|
||||||
for letter in string.ascii_lowercase:
|
for letter in string.ascii_lowercase:
|
||||||
dev_name = 'vd' + letter
|
dev_name = 'vd' + letter
|
||||||
|
|
|
@ -141,7 +141,6 @@ class WriteSources(Task):
|
||||||
@classmethod
|
@classmethod
|
||||||
def run(cls, info):
|
def run(cls, info):
|
||||||
if not info.source_lists.target_exists(info.manifest.system['release']):
|
if not info.source_lists.target_exists(info.manifest.system['release']):
|
||||||
import logging
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
log.warn('No default target has been specified in the sources list, '
|
log.warn('No default target has been specified in the sources list, '
|
||||||
'installing packages may fail')
|
'installing packages may fail')
|
||||||
|
|
|
@ -4,7 +4,6 @@ assets = rel_path(__file__, 'assets')
|
||||||
|
|
||||||
|
|
||||||
def validate_manifest(data, validator, error):
|
def validate_manifest(data, validator, error):
|
||||||
from bootstrapvz.common.tools import rel_path
|
|
||||||
validator(data, rel_path(__file__, 'manifest-schema.yml'))
|
validator(data, rel_path(__file__, 'manifest-schema.yml'))
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,6 @@ class CheckRequestedDebianRelease(Task):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def run(cls, info):
|
def run(cls, info):
|
||||||
from bootstrapvz.common.exceptions import TaskError
|
|
||||||
if info.manifest.release not in (jessie, wheezy, stretch):
|
if info.manifest.release not in (jessie, wheezy, stretch):
|
||||||
msg = 'Debian {info.manifest.release} is not (yet) available in the Puppetlabs.com APT repository.'
|
msg = 'Debian {info.manifest.release} is not (yet) available in the Puppetlabs.com APT repository.'
|
||||||
raise TaskError(msg)
|
raise TaskError(msg)
|
||||||
|
@ -32,7 +31,6 @@ class CheckAssetsPath(Task):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def run(cls, info):
|
def run(cls, info):
|
||||||
from bootstrapvz.common.exceptions import TaskError
|
|
||||||
assets = info.manifest.plugins['puppet']['assets']
|
assets = info.manifest.plugins['puppet']['assets']
|
||||||
if not os.path.exists(assets):
|
if not os.path.exists(assets):
|
||||||
msg = 'The assets directory {assets} does not exist.'.format(assets=assets)
|
msg = 'The assets directory {assets} does not exist.'.format(assets=assets)
|
||||||
|
|
Loading…
Add table
Reference in a new issue