From 6115a90c7083ff9b8c4d1801f409d7d8b1c67d22 Mon Sep 17 00:00:00 2001 From: Girish Shilamkar Date: Wed, 13 Aug 2014 20:19:26 +0530 Subject: [PATCH] Adding explicit error message in verifyNetworkState function in case network is not in desired state --- tools/marvin/marvin/lib/common.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/marvin/marvin/lib/common.py b/tools/marvin/marvin/lib/common.py index 46291a9d040..3706456b359 100644 --- a/tools/marvin/marvin/lib/common.py +++ b/tools/marvin/marvin/lib/common.py @@ -1167,6 +1167,9 @@ def verifyNetworkState(apiclient, networkid, state, listall=True): break retriesCount -= 1 time.sleep(60) + if not isNetworkInDesiredState: + exceptionMessage = "Network state should be %s, it is %s" %\ + (state, networks[0].state) except Exception as e: exceptionOccured = True exceptionMessage = e