Merge "Small fix: catch exception when summary does not give the correct output"
diff --git a/TestON/drivers/common/cli/onosclidriver.py b/TestON/drivers/common/cli/onosclidriver.py
index 8eb26ae..eea502b 100755
--- a/TestON/drivers/common/cli/onosclidriver.py
+++ b/TestON/drivers/common/cli/onosclidriver.py
@@ -2814,9 +2814,12 @@
"""
import json
try:
- topology = self.getTopology( self.topology() )
summary = json.loads( self.summary() )
-
+ except ( TypeError, ValueError ):
+ main.log.exception( "{}: Object not as expected: {!r}".format( self.name, summary ) )
+ return main.ERROR
+ try:
+ topology = self.getTopology( self.topology() )
if topology == {} or topology == None or summary == {} or summary == None:
return main.ERROR
output = ""