pylint unidiomatic-typecheck

This commit is contained in:
Carlos Meza 2018-02-18 20:28:37 -08:00
parent b47b55172b
commit 98975cac7b
3 changed files with 3 additions and 3 deletions

View file

@ -12,7 +12,7 @@ class AddRequiredCommands(Task):
@classmethod @classmethod
def run(cls, info): def run(cls, info):
from bootstrapvz.common.fs.logicalvolume import LogicalVolume from bootstrapvz.common.fs.logicalvolume import LogicalVolume
if type(info.volume) is LogicalVolume: if isinstance(info.volume, LogicalVolume):
info.host_dependencies['lvcreate'] = 'lvm2' info.host_dependencies['lvcreate'] = 'lvm2'
info.host_dependencies['losetup'] = 'mount' info.host_dependencies['losetup'] = 'mount'

View file

@ -13,7 +13,7 @@ class AddRequiredCommands(Task):
def run(cls, info): def run(cls, info):
from ..fs.loopbackvolume import LoopbackVolume from ..fs.loopbackvolume import LoopbackVolume
from ..fs.qemuvolume import QEMUVolume from ..fs.qemuvolume import QEMUVolume
if type(info.volume) is LoopbackVolume: if isinstance(info.volume, LoopbackVolume):
info.host_dependencies['losetup'] = 'mount' info.host_dependencies['losetup'] = 'mount'
info.host_dependencies['truncate'] = 'coreutils' info.host_dependencies['truncate'] = 'coreutils'
if isinstance(info.volume, QEMUVolume): if isinstance(info.volume, QEMUVolume):

View file

@ -22,7 +22,7 @@ def log_call(command, stdin=None, env=None, shell=False, cwd=None):
command_log = realpath(command[0]).replace('/', '.') command_log = realpath(command[0]).replace('/', '.')
log = logging.getLogger(__name__ + command_log) log = logging.getLogger(__name__ + command_log)
if type(command) is list: if isinstance(command, list):
log.debug('Executing: {command}'.format(command=' '.join(command))) log.debug('Executing: {command}'.format(command=' '.join(command)))
else: else:
log.debug('Executing: {command}'.format(command=command)) log.debug('Executing: {command}'.format(command=command))