diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2018-06-14 21:20:59 +0200 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2018-06-14 21:46:14 +0200 |
commit | 7f2d7515e068c2ba072d4f3b4cf0997e06ae8460 (patch) | |
tree | a067dcdd08c3e11a1e820ccb0f9fdef866e70e69 /functest/opnfv_tests/vnf/ims/ixia/utils/IxChassisUtils.py | |
parent | 09d6e6feef33fa47bca440a096894b851b1ebca5 (diff) |
Support py3 in uncovered packages
It has to be noted that cloudify_rest_client doesn't support py3 then
next unit tests vs cloudify-based testcases would be excluded.
Change-Id: I0b0e64929d1238665c778ce51fd6abd5ccf06b6c
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'functest/opnfv_tests/vnf/ims/ixia/utils/IxChassisUtils.py')
-rw-r--r-- | functest/opnfv_tests/vnf/ims/ixia/utils/IxChassisUtils.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/functest/opnfv_tests/vnf/ims/ixia/utils/IxChassisUtils.py b/functest/opnfv_tests/vnf/ims/ixia/utils/IxChassisUtils.py index 973e0264d..301a0c7bc 100644 --- a/functest/opnfv_tests/vnf/ims/ixia/utils/IxChassisUtils.py +++ b/functest/opnfv_tests/vnf/ims/ixia/utils/IxChassisUtils.py @@ -55,7 +55,7 @@ class ChassisRestAPI: headers=urlHeadersJson) logger.debug(response) logger.debug(content) - except Exception, e: + except Exception as e: raise Exception('Got an error code: ', e) return content @@ -74,7 +74,7 @@ class ChassisRestAPI: (response, content) = h.request(loginUrl, 'POST', body=payload, headers=urlHeadersJson) - except Exception, e: + except Exception as e: raise Exception('Got an error code: ', e) return content @@ -95,7 +95,7 @@ class ChassisRestAPI: (response, content) = h.request(url, 'POST', json.dumps(payload), headers=urlHeadersJson) - except Exception, e: + except Exception as e: raise Exception('Got an error code: ', e) return content @@ -111,9 +111,9 @@ class ChassisRestAPI: (response, content) = h.request(url, 'PATCH', json.dumps(payload), urlHeadersJson) - except Exception, e: + except Exception as e: - # print (response, content) + # print((response, content)) raise Exception('Got an error code: ', e) return content @@ -127,7 +127,7 @@ class ChassisRestAPI: disable_ssl_certificate_validation=True) (response, content) = h.request(url, 'DELETE', '', urlHeadersJson) logger.debug('DELETE: ' + url) - except Exception, e: + except Exception as e: raise Exception('Got an error code: ', e) if response.status not in okStates: raise TestFailedError(json.loads(content)['error']) @@ -142,7 +142,7 @@ class ChassisRestAPI: disable_ssl_certificate_validation=True) logger.debug('GET: ' + url) (response, content) = h.request(url, 'GET', '', urlHeadersJson) - except Exception, e: + except Exception as e: raise Exception('Got an error code: ', e) if response.status not in okStates: raise TestFailedError(json.loads(content)['error']) |