@@ -104,7 +104,7 @@ def post_init(self, custom_args):
104104 self .arch = arch
105105 else :
106106 raise KiwiBootLoaderGrubPlatformError (
107- 'host architecture %s not supported for grub2 setup' % arch
107+ f 'host architecture { arch } not supported for grub2 setup'
108108 )
109109
110110 if self .custom_args and 'grub_directory_name' in self .custom_args :
@@ -417,7 +417,7 @@ def setup_install_image_config(
417417 self .config = template .substitute (parameters )
418418 except Exception as e :
419419 raise KiwiTemplateError (
420- '%s: %s' % ( type (e ).__name__ , format (e ))
420+ f' { type (e ).__name__ } : { format (e )} '
421421 )
422422 if self .firmware .efi_mode () and self .early_boot_script_efi :
423423 self ._copy_grub_config_to_efi_path (
@@ -488,7 +488,7 @@ def setup_live_image_config(
488488 self .config = template .substitute (parameters )
489489 except Exception as e :
490490 raise KiwiTemplateError (
491- '%s: %s' % ( type (e ).__name__ , format (e ))
491+ f' { type (e ).__name__ } : { format (e )} '
492492 )
493493 if self .firmware .efi_mode () and self .early_boot_script_efi :
494494 self ._copy_grub_config_to_efi_path (
@@ -1511,7 +1511,7 @@ def _copy_modules_to_boot_directory_from(self, module_path):
15111511 )
15121512 except Exception as e :
15131513 raise KiwiBootLoaderGrubModulesError (
1514- 'Module synchronisation failed with: %s' % format (e )
1514+ f 'Module synchronisation failed with: { format (e )} '
15151515 )
15161516
15171517 def _get_shim_install (self ):
@@ -1656,7 +1656,7 @@ def _get_partition_start(self, disk_device):
16561656 start_track = int (fdasd_output .split (' ' )[2 ].lstrip ())
16571657 except Exception :
16581658 raise KiwiDiskGeometryError (
1659- 'unknown partition format: %s' % fdasd_output
1659+ f 'unknown partition format: { fdasd_output } '
16601660 )
16611661 return '{0}' .format (start_track * blocks )
16621662 else :
@@ -1699,7 +1699,7 @@ def _get_dasd_disk_geometry_element(self, disk_device, search):
16991699 return int (fdasd_output .split (':' )[1 ].lstrip ())
17001700 except Exception :
17011701 raise KiwiDiskGeometryError (
1702- 'unknown format for disk geometry: %s' % fdasd_output
1702+ f 'unknown format for disk geometry: { fdasd_output } '
17031703 )
17041704
17051705 def _create_loopback_config (self , filename ):
@@ -1720,6 +1720,6 @@ def _get_custom_template(self) -> str:
17201720 template_path = os .path .join (os .path .abspath (self .xml_state .xml_data .description_dir ),
17211721 self .xml_state .build_type .bootloader [0 ].get_grub_template ())
17221722 if not os .path .exists (template_path ):
1723- raise KiwiFileNotFound ('failed to locate custom GRUB template %s' % template_file )
1723+ raise KiwiFileNotFound (f 'failed to locate custom GRUB template { template_file } ' )
17241724
17251725 return template_path
0 commit comments