Fixing python 3 support for pep8 and doc

This also resolves Python 3 incompatibilites with Zone Tests
using the SingleQueryClient.

Change-Id: I25185d0b3c658da8793df9bfa69f714d6ca96a60
This commit is contained in:
Erik Olof Gunnar Andersson 2018-09-30 01:58:45 -07:00
parent b9a90dff11
commit d14f818c62
2 changed files with 4 additions and 3 deletions

View File

@ -14,6 +14,7 @@
import dns
import dns.exception
import dns.query
import six
from tempest import config
CONF = config.CONF
@ -50,7 +51,7 @@ class SingleQueryClient(object):
@classmethod
def _prepare_query(cls, zone_name, rdatatype):
# support plain strings: "SOA", "A"
if isinstance(rdatatype, basestring):
if isinstance(rdatatype, six.string_types):
rdatatype = dns.rdatatype.from_text(rdatatype)
dns_message = dns.message.make_query(zone_name, rdatatype)
dns_message.set_opcode(dns.opcode.QUERY)

View File

@ -37,8 +37,8 @@ html_theme_path = [openstackdocstheme.get_html_theme_path()]
# We ask git for the SHA checksum
# The git SHA checksum is used by "log-a-bug"
git_cmd = ["/usr/bin/git", "rev-parse", "HEAD"]
gitsha = subprocess.Popen(
git_cmd, stdout=subprocess.PIPE).communicate()[0].strip('\n')
gitsha = str(subprocess.Popen(
git_cmd, stdout=subprocess.PIPE).communicate())[0].strip('\n')
# tag that reported bugs will be tagged with
bug_tag = "tempest-plugin-docs"
# source tree