Comment 2 for bug 1849449

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.opendev.org/690514
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=ecef65b9b51fc1bd684ca9eb72a024ee44ca9347
Submitter: Zuul
Branch: master

commit ecef65b9b51fc1bd684ca9eb72a024ee44ca9347
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Wed Oct 23 08:31:59 2019 +0000

    Do not use exceptions in get_link_id() to control the code flow

    Instead of using exceptions as control flow, check the Pyroute2 command
    result and only raise the Neutron exception if needed. This will also
    reduce the traceback log in case of raising NetworkInterfaceNotFound.

    Although in Python the use of exception for this is common, this is
    usually considered an antipattern.

    Change-Id: I0e8bb3b0f6a46f2bac75e38c6ac6cdd094247f89
    Closes-Bug: #1849449