MarkGodwin / tplink-omada-api

MIT License
12 stars 9 forks source link

Fix missing key exception when device doesn't have 'uplink' #11

Closed mheath closed 1 year ago

mheath commented 1 year ago

My 'root' switch doesn't have an uplink and when trying to check if device.uplink is None, I get a missing key exception. This fixes that problem. I'm guessing the second if uplink is None check in the uplink property is redundant but better safe than sorry so I left it there.