Re-raise python exception correctly

Bug #1726846 reported by Petr Jediný
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
Trunk
Fix Committed
Undecided
Unassigned

Bug Description

try:
    ...
except Exception as e:
    raise e

will create new stack trace on python 2 we should re-raise with raise only

try:
    ...
except Exception as e:
    raise

as described in http://www.ianbicking.org/blog/2007/09/re-raising-exceptions.html

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/36759
Submitter: Petr Jedin? (<email address hidden>)

Sachin Bansal (sbansal)
no longer affects: opencontrail
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/36759
Committed: http://github.com/Juniper/contrail-controller/commit/97e052715a5023bfba1b558c861b6f4bf873cccf
Submitter: Zuul (<email address hidden>)
Branch: master

commit 97e052715a5023bfba1b558c861b6f4bf873cccf
Author: Petr Jediný <email address hidden>
Date: Tue Oct 24 14:29:32 2017 +0200

Re-raise exception correctly

Change-Id: I079b703227bdf134932a81cd4606146ddae32141
Closes-Bug: #1726846

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.