diff options
author | morganrol <morgan.richomme@orange.com> | 2021-04-21 14:45:24 +0200 |
---|---|---|
committer | morganrol <morgan.richomme@orange.com> | 2021-04-21 14:45:24 +0200 |
commit | 0a9bc9eba1ada15ec1a2934f3baa465804f20e76 (patch) | |
tree | bf411d29ec69e1841bab69cfa91c64b00761ddaa /src/onaptests/scenario/basic_vm.py | |
parent | e94d90fb8fb843ee577d0fb05809c9e48c223ba8 (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.py')
-rw-r--r-- | src/onaptests/scenario/basic_vm.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/onaptests/scenario/basic_vm.py b/src/onaptests/scenario/basic_vm.py index b758088..3ad6392 100644 --- a/src/onaptests/scenario/basic_vm.py +++ b/src/onaptests/scenario/basic_vm.py @@ -43,9 +43,12 @@ class BasicVm(testcase.TestCase): else: self.__logger.info("No cleanup requested. Test completed.") 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() |