aboutsummaryrefslogtreecommitdiffstats
path: root/src/onaptests/scenario/basic_vm_macro.py
diff options
context:
space:
mode:
authormorganrol <morgan.richomme@orange.com>2021-04-21 14:45:24 +0200
committermorganrol <morgan.richomme@orange.com>2021-04-21 14:45:24 +0200
commit0a9bc9eba1ada15ec1a2934f3baa465804f20e76 (patch)
treebf411d29ec69e1841bab69cfa91c64b00761ddaa /src/onaptests/scenario/basic_vm_macro.py
parente94d90fb8fb843ee577d0fb05809c9e48c223ba8 (diff)
[EXCEPTIONS] Distinguish onaptests and onapsdk exception
there is no error_message method on onapsdk exception as a consequence we may raise a new excpetion when catching sdk exception leading to the non generation of the report Issue-ID: TEST-332 Signed-off-by: morganrol <morgan.richomme@orange.com> Change-Id: I42d1413ef142e29eeafdfe701f136ae45b097de4
Diffstat (limited to 'src/onaptests/scenario/basic_vm_macro.py')
-rw-r--r--src/onaptests/scenario/basic_vm_macro.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/onaptests/scenario/basic_vm_macro.py b/src/onaptests/scenario/basic_vm_macro.py
index c90d48b..f22ee12 100644
--- a/src/onaptests/scenario/basic_vm_macro.py
+++ b/src/onaptests/scenario/basic_vm_macro.py
@@ -114,9 +114,12 @@ class BasicVmMacro(testcase.TestCase):
self.test.execute()
self.test.cleanup()
self.result = 100
- except (OnapTestException, SDKException) as exc:
+ except OnapTestException as exc:
self.result = 0
self.__logger.error(exc.error_message)
+ except SDKException:
+ self.result = 0
+ self.__logger.error("SDK Exception")
finally:
self.stop_time = time.time()