Skip to content

Commit

Permalink
Be more helpful for missing GRUB bin directory (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
hartwork committed Dec 29, 2017
1 parent 24368c8 commit f854d0b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion grub2_theme_preview/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,11 +269,15 @@ def _inner_main(options):
with open(abs_tmp_grub_cfg_file, 'w') as f:
f.write(grub_cfg_content)

grub2_platform_directory = _grub2_directory(_GRUB2_PLATFORM)
if not os.path.exists(grub2_platform_directory):
raise OSError(errno.ENOENT, 'GRUB platform directory "%s" not found' % grub2_platform_directory)

try:
abs_tmp_img_file = os.path.join(abs_tmp_folder, 'grub2_theme_demo.img')
assemble_cmd = [
options.grub2_mkrescue,
'--directory=%s' % _grub2_directory(_GRUB2_PLATFORM),
'--directory=%s' % grub2_platform_directory,
'--xorriso', options.xorriso,
'--output', abs_tmp_img_file,
]
Expand Down

0 comments on commit f854d0b

Please sign in to comment.