Browse Source

Fixing python 3 support for pep8 and doc

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

Change-Id: I25185d0b3c658da8793df9bfa69f714d6ca96a60
Erik Olof Gunnar Andersson 6 months ago
parent
commit
d14f818c62
2 changed files with 4 additions and 3 deletions
  1. 2
    1
      designate_tempest_plugin/services/dns/query/query_client.py
  2. 2
    2
      doc/source/conf.py

+ 2
- 1
designate_tempest_plugin/services/dns/query/query_client.py View File

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

+ 2
- 2
doc/source/conf.py View File

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

Loading…
Cancel
Save