LedgerHQ / nanos-secure-sdk

Secure (ST31) SDK for Ledger Nano S
Apache License 2.0
98 stars 53 forks source link

Non Descriptive/functioning error message #4

Open tarrenj opened 7 years ago

tarrenj commented 7 years ago

The icon.py script only supports images with 16 or less colors. The expected error message doesn't print when the relevant if statement is met.

The if statement is at: https://github.com/LedgerHQ/nanos-secure-sdk/blob/1525802dda0b5437439c61b79f49e632b2080d14/icon.py#L154

I've resolved this by replacing the output line: https://github.com/LedgerHQ/nanos-secure-sdk/blob/1525802dda0b5437439c61b79f49e632b2080d14/icon.py#L155 with: print("Too many colors!")

tarrenj commented 7 years ago

print('Too many colors used in %, please use <=16.' % filename) would also work and be much more helpful/descriptive. I haven't tested that exact syntax though.