summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
4d85901)
Instead of crashing with a type coercion error in popen (because
the logo file is None, then).
-def search_file(filename, search_path='/bin' + os.pathsep + '/usr/bin', lst_return=False):
+def search_file(filename, search_path='/bin' + os.pathsep + '/usr/bin', lst_return=False, required=False):
"""Given a search path, find file
@filename: name of file to search for
"""Given a search path, find file
@filename: name of file to search for
retval.append(os.path.abspath(os.path.join(current_dir, filename)))
if not lst_return:
break
retval.append(os.path.abspath(os.path.join(current_dir, filename)))
if not lst_return:
break
+
+ if required and not retval:
+ raise CriticalException("Required file %s not found in %s" % (filename, search_path))
+
if lst_return:
return retval
elif retval:
if lst_return:
return retval
elif retval:
grub_target = target + '/boot/grub/'
execute(mkdir, grub_target)
grub_target = target + '/boot/grub/'
execute(mkdir, grub_target)
- logo = search_file('logo.16', iso_mount)
+ logo = search_file('logo.16', iso_mount, required=True)
exec_rsync(logo, syslinux_target + 'logo.16')
bootx64_efi = search_file('bootx64.efi', iso_mount)
exec_rsync(logo, syslinux_target + 'logo.16')
bootx64_efi = search_file('bootx64.efi', iso_mount)