Fixed incorrect string type checking

Co-Authored-By: Jack Steers <jack.steers@sap.com>

Change-Id: I89c4c00f8c641191a21b6afe3ab0b0b9f28dd60b
This commit is contained in:
William Stevenson 2016-11-17 16:06:23 +00:00
parent 2d228cd6b9
commit e7b54b3606

View File

@ -15,6 +15,7 @@
import copy
import json
import six
import time
from ironicclient import exceptions
@ -292,7 +293,7 @@ class NodeInfo(object):
"""
ironic = ironic or self.ironic
ports = self.ports()
if isinstance(port, str):
if isinstance(port, six.string_types):
port = ports[port]
LOG.debug('Updating port %(mac)s with patches %(patches)s',
@ -333,7 +334,7 @@ class NodeInfo(object):
"""
ironic = ironic or self.ironic
ports = self.ports()
if isinstance(port, str):
if isinstance(port, six.string_types):
port = ports[port]
ironic.port.delete(port.uuid)