Fixing python 3 support for pep8 and doc
This also resolves Python 3 incompatibilites with Zone Tests
using the SingleQueryClient.
Change-Id: I25185d0b3c658da8793df9bfa69f714d6ca96a60
diff --git a/designate_tempest_plugin/services/dns/query/query_client.py b/designate_tempest_plugin/services/dns/query/query_client.py
index 65552c7..5c6b021 100644
--- a/designate_tempest_plugin/services/dns/query/query_client.py
+++ b/designate_tempest_plugin/services/dns/query/query_client.py
@@ -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 @@
@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)
diff --git a/doc/source/conf.py b/doc/source/conf.py
index fa9065a..23a2069 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -37,8 +37,8 @@
# 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