mirror of
https://github.com/Threnklyn/nton.git
synced 2026-05-18 21:03:28 +02:00
Warn if the NRO has no icon instead of crashing
This commit is contained in:
@@ -264,11 +264,16 @@ def build(
|
||||
else:
|
||||
icon_file_res = nstool.get_icon(path, icon_file)
|
||||
if icon_file_res:
|
||||
if icon_file_res == "No Icon was extracted from the asset.":
|
||||
log.warning("The NRO does not have an Icon, proceeding without one.")
|
||||
else:
|
||||
log.critical(f"Failed extracting the Icon partition from the NRO, {icon_file_res}")
|
||||
sys.exit(2)
|
||||
else:
|
||||
log.debug("Got the Icon partition")
|
||||
log.debug(base64.b64encode(icon_file.read_bytes()).decode())
|
||||
|
||||
if icon_file.exists():
|
||||
# We must strip every unnecessary metadata or the icon will be a '?'
|
||||
try:
|
||||
subprocess.check_output([
|
||||
|
||||
Reference in New Issue
Block a user