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.
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 secondif uplink is None
check in theuplink
property is redundant but better safe than sorry so I left it there.