summaryrefslogtreecommitdiff
path: root/nova/pci
diff options
context:
space:
mode:
authorTakashi Natsume <takanattie@gmail.com>2020-05-14 21:04:12 +0900
committerTakashi Natsume <takanattie@gmail.com>2020-12-13 11:25:14 +0000
commit07462dd0050fbfea89e517759b312b67a368e279 (patch)
treed272a68079988f8147a3d3950b9a60bd8afc13d1 /nova/pci
parentf851d20b652f9f29de9caa0749a78bf29c326b6d (diff)
downloadnova-07462dd0050fbfea89e517759b312b67a368e279.tar.gz
Remove six.binary_type/integer_types/string_types
Replace the following items with Python 3 style code. - six.binary_type - six.integer_types - six.string_types Subsequent patches will replace other six usages. Change-Id: Ide65686cf02463045f5c32771ca949802b19636f Implements: blueprint six-removal Signed-off-by: Takashi Natsume <takanattie@gmail.com>
Diffstat (limited to 'nova/pci')
-rw-r--r--nova/pci/devspec.py4
-rw-r--r--nova/pci/utils.py5
2 files changed, 3 insertions, 6 deletions
diff --git a/nova/pci/devspec.py b/nova/pci/devspec.py
index 0bbb81b8cf..d76a25ce6a 100644
--- a/nova/pci/devspec.py
+++ b/nova/pci/devspec.py
@@ -15,8 +15,6 @@ import abc
import re
import string
-import six
-
from nova import exception
from nova.i18n import _
from nova.pci import utils
@@ -204,7 +202,7 @@ class WhitelistPciAddress(object):
def _init_address_fields(self, pci_addr):
if not self.is_physical_function:
- if isinstance(pci_addr, six.string_types):
+ if isinstance(pci_addr, str):
self.pci_address_spec = PciAddressGlobSpec(pci_addr)
elif isinstance(pci_addr, dict):
self.pci_address_spec = PciAddressRegexSpec(pci_addr)
diff --git a/nova/pci/utils.py b/nova/pci/utils.py
index 52ca20a616..ed0384b056 100644
--- a/nova/pci/utils.py
+++ b/nova/pci/utils.py
@@ -20,7 +20,6 @@ import os
import re
from oslo_log import log as logging
-import six
from nova import exception
@@ -59,9 +58,9 @@ def pci_device_prop_match(pci_dev, specs):
# mismatch with the tags provided by users for port
# binding profile and the ones configured by operators
# with pci whitelist option.
- if isinstance(v, six.string_types):
+ if isinstance(v, str):
v = v.lower()
- if isinstance(pci_dev_v, six.string_types):
+ if isinstance(pci_dev_v, str):
pci_dev_v = pci_dev_v.lower()
if pci_dev_v != v:
return False