Fix landscape Smells

This commit is contained in:
Marcus Schäfer 2016-06-23 17:11:46 +02:00
parent 3335e78bbc
commit db238fe899
No known key found for this signature in database
GPG Key ID: AD11DD02B44996EF
6 changed files with 13 additions and 6 deletions

View File

@ -92,9 +92,11 @@ class BootImageBase(object):
"""
raise NotImplementedError
def create_initrd(self):
def create_initrd(self, mbrid=None):
"""
Implements creation of the initrd
:param object mbrid: instance of ImageIdentifier
"""
raise NotImplementedError

View File

@ -76,6 +76,8 @@ class BootImageDracut(BootImageBase):
def create_initrd(self, mbrid=None):
"""
Call dracut to create the initrd and XZ compress the result
:param object mbrid: unused
"""
if self.is_prepared():
log.info('Creating generic dracut initrd archive')

View File

@ -85,6 +85,8 @@ class BootImageKiwi(BootImageBase):
def create_initrd(self, mbrid=None):
"""
Create initrd from prepared boot system tree and compress the result
:param object mbrid: instance of ImageIdentifier
"""
if self.is_prepared():
log.info('Creating initrd cpio archive')

View File

@ -508,9 +508,9 @@ class BootLoaderConfigGrub2(BootLoaderConfigBase):
options=['-z', '-a']
)
self._check_boot_theme_exists(lookup_path)
self._check_boot_theme_exists()
def _check_boot_theme_exists(self, lookup_path):
def _check_boot_theme_exists(self):
if self.theme:
theme_dir = os.sep.join(
[

View File

@ -25,7 +25,7 @@ class FileSystemIsoFs(FileSystemBase):
"""
Implements creation of iso filesystem
"""
def create_on_file(self, filename, label=None):
def create_on_file(self, filename, label=None, exclude=None):
"""
Create iso filesystem from data tree
@ -34,6 +34,7 @@ class FileSystemIsoFs(FileSystemBase):
:param string filename: result file path name
:param string label: unused
:param string exclude: unused
"""
iso = Iso(self.root_dir)
iso.init_iso_creation_parameters(

View File

@ -198,6 +198,6 @@ def main():
# logging.info('Calling: kiwi %s', ' '.join(arguments.translated))
Command.execute(arguments.translated)
except NotImplementedError as e:
logging.error('KiwiCompatError: %s' % format(e))
logging.error('KiwiCompatError: %s', format(e))
except OSError as e:
logging.error('KiwiCompatError: %s' % format(e))
logging.error('KiwiCompatError: %s', format(e))