From ee54ef3cc13c0633f664264dfb450f3d2fab13bc Mon Sep 17 00:00:00 2001 From: ahothan Date: Fri, 11 Aug 2017 09:12:21 -0700 Subject: [PATCH] Fix NFVBENCH-2 Cleanup after error causes a AttributeError exception Change-Id: Ifd31ded84ae2ba077c7ee351c703b9bb6b31622f Signed-off-by: ahothan --- nfvbench/service_chain.py | 6 ++++-- 1 file 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() -- 2.16.6