2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 14:07:59 +00:00

[master] address some python2/3 incompatibilities

This commit is contained in:
Evan Hunt
2016-04-29 10:38:35 -07:00
parent 17e9d6023e
commit 304d16f08f
2 changed files with 2 additions and 3 deletions

View File

@@ -48,8 +48,7 @@ class dnskey:
self.fromtuple(name, alg, keyid, keyttl)
self._dir = directory or os.path.dirname(key) or '.'
key = os.path.basename(key)
key = os.path.basename(key).decode('ascii')
(name, alg, keyid) = key.split('+')
name = name[1:-1]
alg = int(alg)

View File

@@ -102,7 +102,7 @@ class PolicyLex:
def __init__(self, **kwargs):
for r in self.reserved:
self.reserved_map[r.lower().translate(maketrans('_', '-'))] = r
self.reserved_map[r.lower().translate(str.maketrans('_', '-'))] = r
self.lexer = lex.lex(object=self, **kwargs)
def test(self, text):