commit | 1331025a6bba3b51c8745147165df0ca8de64bad | [log] [tgz] |
---|---|---|
author | You Wang <you@onlab.us> | Sun Jul 31 10:56:14 2016 -0700 |
committer | You Wang <you@onlab.us> | Sun Jul 31 10:56:14 2016 -0700 |
tree | 4a52bf18bc3787c1975e7138d9f745842351ff8e | |
parent | b97cd56302d9eafb593073c09377487479248148 [diff] |
Avoid referencing variable before assignment in checkStatus function Change-Id: Ia458c4767ac6eeb245de28d0f9bb009676fcd741
diff --git a/TestON/drivers/common/cli/onosclidriver.py b/TestON/drivers/common/cli/onosclidriver.py index eea502b..6c3e7d7 100755 --- a/TestON/drivers/common/cli/onosclidriver.py +++ b/TestON/drivers/common/cli/onosclidriver.py
@@ -2814,7 +2814,8 @@ """ import json try: - summary = json.loads( self.summary() ) + summary = self.summary() + summary = json.loads( summary ) except ( TypeError, ValueError ): main.log.exception( "{}: Object not as expected: {!r}".format( self.name, summary ) ) return main.ERROR