From 401927362b8ed567d568f56b6737acc7d956073b Mon Sep 17 00:00:00 2001 From: chenaidong1 Date: Wed, 7 Dec 2016 17:30:40 +0800 Subject: [PATCH] Correct ceilometer reraising of exception When an exception was caught and rethrown, it should call 'raise' without any arguments because it shows the place where an exception occured initially instead of place where the exception re-raised. Change-Id: Ie975b938dbc5d6886ccc83f6897aa4c8dea1cdee --- ceilometer/hardware/pollsters/generic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ceilometer/hardware/pollsters/generic.py b/ceilometer/hardware/pollsters/generic.py index 22e65a8f7a..647cfca1d3 100644 --- a/ceilometer/hardware/pollsters/generic.py +++ b/ceilometer/hardware/pollsters/generic.py @@ -113,7 +113,7 @@ class GenericHardwareDeclarativePollster(plugin_base.PollsterBase): LOG.exception(_LE("Cannot load inspector %(name)s: %(err)s"), dict(name=parsed_url.scheme, err=err)) - raise err + raise return self.inspectors[parsed_url.scheme] def get_samples(self, manager, cache, resources=None):