Catch client Exception when do client call
We should catch client Exception instead of nimble Exception Change-Id: Ifb3fdb1fc7a7c607cbeabb03ffcc58146c4a89b2
This commit is contained in:
@@ -13,7 +13,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from nimble.common import exception
|
||||
from ironicclient import exceptions as client_e
|
||||
|
||||
from nimble.common import ironic
|
||||
from nimble.engine.baremetal import ironic_states
|
||||
|
||||
@@ -94,6 +95,6 @@ def get_node_list(**kwargs):
|
||||
ironicclient = ironic.IronicClientWrapper()
|
||||
try:
|
||||
node_list = ironicclient.call("node.list", **kwargs)
|
||||
except exception.NimbleException:
|
||||
except client_e.ClientException:
|
||||
node_list = []
|
||||
return node_list
|
||||
|
||||
Reference in New Issue
Block a user