poe variable check for virtual interfaces #100

This commit is contained in:
tomaae 2021-03-01 20:56:48 +01:00
parent 5fd9005811
commit c8e1e80729

View file

@ -341,7 +341,7 @@ class MikrotikControllerPortSwitch(MikrotikControllerSwitch):
mod_value = True
self._ctrl.set_value(path, param, value, mod_param, mod_value)
if self._data["poe-out"] == "auto-on":
if "poe-out" in self._data and self._data["poe-out"] == "auto-on":
path = "/interface/ethernet"
self._ctrl.set_value(path, param, value, "poe-out", "off")