Selaa lähdekoodia

Check that ifOperStatus is in the dict.

Joe Clarke 4 vuotta sitten
vanhempi
commit
600ac9df35
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      automation/network/poll_errors.py

+ 1 - 1
automation/network/poll_errors.py

@@ -130,7 +130,7 @@ if __name__ == "__main__":
                 continue
             if not "ifDescr" in vard:
                 continue
-            if int(vard["ifOperStatus"]) == IF_UP:
+            if "ifOperStatus" in vard and int(vard["ifOperStatus"]) == IF_UP:
                 continue
             if not "ifAlias" in vard:
                 vard["ifAlias"] = ""