From 17c2e2c74028102fc230cbc1186f809c8a3cc5ef Mon Sep 17 00:00:00 2001 From: Amaury Medeiros Date: Tue, 21 Jun 2016 14:07:11 +0100 Subject: [PATCH] Simplify boolean expression in executils.py There's no need for checking again if next_up is not instance of CausedByException as this is exactly what the else clause means. Change-Id: I437b3b4948e89d6a138be03e9613e522b10d4824 --- oslo_utils/excutils.py | 1 - 1 file changed, 1 deletion(-) diff --git a/oslo_utils/excutils.py b/oslo_utils/excutils.py index 9a0d9ca..eff624b 100644 --- a/oslo_utils/excutils.py +++ b/oslo_utils/excutils.py @@ -97,7 +97,6 @@ class CausedByException(Exception): buf.write(line) if i + 1 != len(lines): buf.write(os.linesep) - if not isinstance(next_up, CausedByException): # Don't go deeper into non-caused-by exceptions... as we # don't know if there exception 'cause' attributes are even # useable objects...