mikemountain / fantasy-football-scoreboard

Display the score of your fantasy football team on a Raspberry Pi driven RGB LED matrix for maximum ease of disappointment
GNU General Public License v3.0
56 stars 9 forks source link

Fixed a bug where the script would crash when a user avatar wasn't defined #18

Closed mmethot closed 3 years ago

mmethot commented 3 years ago

Hey Mike!

This week, I came across a player in my league who hadn't defined his user avatar.

The renderer somehow returned None for that user avatar and crashed when trying to do some image manipulation on it. So I wrote a little fix that worked when it happens. It simply replaces the user avatar with a predefined avatar.

Disclaimer 1: I used an avatar called 'noneLogo.png' for this matter, it could be anything really. I used a question mark icon, but since it's git ignored, you'll have to define it on your end.

Disclaimer 2: I am totally not a python dev (but am a dev in RL, just not python (yet)!) and code might not be 100% fool-proof. I made it work locally, but I might have forgot some edge-cases that may fail. Please review and feel free to discard if it seems too risky. Also check for space/tab indentation as I know python is picky about this, and IDEs tend to not be the same.

Disclaimer 3: I really like what you did with this, I bought you a beer or two, thanks a lot and enjoy! 🍺

mikemountain commented 3 years ago

@mmethot Thanks man! Really appreciate it. Been lagging working on this for a while, cheers for this and the beer!