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:
parent
b9a90dff11
commit
d14f818c62
|
@ -14,6 +14,7 @@
|
||||||
import dns
|
import dns
|
||||||
import dns.exception
|
import dns.exception
|
||||||
import dns.query
|
import dns.query
|
||||||
|
import six
|
||||||
from tempest import config
|
from tempest import config
|
||||||
|
|
||||||
CONF = config.CONF
|
CONF = config.CONF
|
||||||
|
@ -50,7 +51,7 @@ class SingleQueryClient(object):
|
||||||
@classmethod
|
@classmethod
|
||||||
def _prepare_query(cls, zone_name, rdatatype):
|
def _prepare_query(cls, zone_name, rdatatype):
|
||||||
# support plain strings: "SOA", "A"
|
# support plain strings: "SOA", "A"
|
||||||
if isinstance(rdatatype, basestring):
|
if isinstance(rdatatype, six.string_types):
|
||||||
rdatatype = dns.rdatatype.from_text(rdatatype)
|
rdatatype = dns.rdatatype.from_text(rdatatype)
|
||||||
dns_message = dns.message.make_query(zone_name, rdatatype)
|
dns_message = dns.message.make_query(zone_name, rdatatype)
|
||||||
dns_message.set_opcode(dns.opcode.QUERY)
|
dns_message.set_opcode(dns.opcode.QUERY)
|
||||||
|
|
|
@ -37,8 +37,8 @@ html_theme_path = [openstackdocstheme.get_html_theme_path()]
|
||||||
# We ask git for the SHA checksum
|
# We ask git for the SHA checksum
|
||||||
# The git SHA checksum is used by "log-a-bug"
|
# The git SHA checksum is used by "log-a-bug"
|
||||||
git_cmd = ["/usr/bin/git", "rev-parse", "HEAD"]
|
git_cmd = ["/usr/bin/git", "rev-parse", "HEAD"]
|
||||||
gitsha = subprocess.Popen(
|
gitsha = str(subprocess.Popen(
|
||||||
git_cmd, stdout=subprocess.PIPE).communicate()[0].strip('\n')
|
git_cmd, stdout=subprocess.PIPE).communicate())[0].strip('\n')
|
||||||
# tag that reported bugs will be tagged with
|
# tag that reported bugs will be tagged with
|
||||||
bug_tag = "tempest-plugin-docs"
|
bug_tag = "tempest-plugin-docs"
|
||||||
# source tree
|
# source tree
|
||||||
|
|
Loading…
Reference in New Issue