summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorahothan <ahothan@cisco.com>2017-08-11 09:12:21 -0700
committerahothan <ahothan@cisco.com>2017-08-11 09:12:21 -0700
commitee54ef3cc13c0633f664264dfb450f3d2fab13bc (patch)
tree0c0657c0a76b340f36a44d0db89dff3ed77d0333
parentf9be20deb65085a0bb2a32980bb182c10a56324a (diff)
Fix NFVBENCH-2 Cleanup after error causes a AttributeError exception
Change-Id: Ifd31ded84ae2ba077c7ee351c703b9bb6b31622f Signed-off-by: ahothan <ahothan@cisco.com>
-rw-r--r--nfvbench/service_chain.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/nfvbench/service_chain.py b/nfvbench/service_chain.py
index 104cfb4..0a5fd13 100644
--- a/nfvbench/service_chain.py
+++ b/nfvbench/service_chain.py
@@ -134,5 +134,7 @@ class ServiceChain(object):
return self.stats_manager.get_version()
def close(self):
- self.stage_manager.close()
- self.stats_manager.close()
+ if self.stage_manager:
+ self.stage_manager.close()
+ if self.stats_manager:
+ self.stats_manager.close()