Add KeyError exception handling for compareIntent function in
OnosCliDriver
Change-Id: If3e211c645b9c38e4bbc5f12f41f4d84e4bbe3cc
diff --git a/TestON/drivers/common/cli/onosclidriver.py b/TestON/drivers/common/cli/onosclidriver.py
index 61c38b7..832fe29 100644
--- a/TestON/drivers/common/cli/onosclidriver.py
+++ b/TestON/drivers/common/cli/onosclidriver.py
@@ -2205,6 +2205,9 @@
if returnValue == main.TRUE:
main.log.info( self.name + ": all intent IDs and states match that in ONOS" )
return returnValue
+ except KeyError:
+ main.log.exception( self.name + ": KeyError exception found" )
+ return main.ERROR
except ( TypeError, ValueError ):
main.log.exception( "{}: Object not as expected: {!r}".format( self.name, intentsRaw ) )
return main.ERROR