Use a pythonic way to catch exceptions

Bug #1473614 reported by Hua Wang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Magnum
Fix Released
Undecided
Hua Wang

Bug Description

We shouldn't use the isinstance function to determinate the type of exceptions. For example https://github.com/openstack/magnum/blob/master/magnum/conductor/handlers/bay_conductor.py#L130.

Hua Wang (humble00)
Changed in magnum:
assignee: nobody → Hua Wang (humble00)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to magnum (master)

Fix proposed to branch: master
Review: https://review.openstack.org/200790

Changed in magnum:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to magnum (master)

Reviewed: https://review.openstack.org/200790
Committed: https://git.openstack.org/cgit/openstack/magnum/commit/?id=adf8f72d32e622da94fc87575abaebcdd573b172
Submitter: Jenkins
Branch: master

commit adf8f72d32e622da94fc87575abaebcdd573b172
Author: Wanghua <email address hidden>
Date: Sat Jul 11 12:47:42 2015 +0800

    Use the pythonic way to catch exceptions

    We shouldn't use the isinstance fucntion instead of except to determinate
    the type of exceptions.

    Closes-Bug: 1473614
    Change-Id: I7882e68ea406c6c8b66a877072adf976171189ce

Changed in magnum:
status: In Progress → Fix Committed
Adrian Otto (aotto)
Changed in magnum:
milestone: none → mitaka-1
status: Fix Committed → Fix Released
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.