From 616098dcd36b20e01d38898b8942003df664e6ac Mon Sep 17 00:00:00 2001 From: Boris Pavlovic Date: Fri, 14 Jun 2013 17:53:53 +0400 Subject: Do not raise NEW exceptions Raising NEW exception is bad practice, because we lose TraceBack. So all places like: except SomeException as e: raise e should be replaced by except SomeException: raise If we are doing some other actions before reraising we should store information about exception then do all actions and then reraise it. This is caused by eventlet bug. It lost information about exception if it switch threads. fixes bug 1191730 Change-Id: Ia375ecef9f16bda65d5146d14ed4b37a988abb0c --- nova/tests/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nova/tests') diff --git a/nova/tests/utils.py b/nova/tests/utils.py index 994e4f220..556d1f91d 100644 --- a/nova/tests/utils.py +++ b/nova/tests/utils.py @@ -212,5 +212,5 @@ def is_ipv6_supported(): if e.errno == errno.EAFNOSUPPORT: has_ipv6_support = False else: - raise e + raise return has_ipv6_support -- cgit