mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-01 06:55:30 +00:00
explicitly convert byte to string
This commit is contained in:
@@ -107,6 +107,8 @@ def check(zone, args):
|
|||||||
fp, _ = Popen(cmd, stdout=PIPE).communicate()
|
fp, _ = Popen(cmd, stdout=PIPE).communicate()
|
||||||
|
|
||||||
for line in fp.splitlines():
|
for line in fp.splitlines():
|
||||||
|
if type(line) is not str:
|
||||||
|
line = line.decode('ascii')
|
||||||
rrlist.append(SECRR(line, args.lookaside))
|
rrlist.append(SECRR(line, args.lookaside))
|
||||||
rrlist = sorted(rrlist, key=lambda rr: (rr.keyid, rr.keyalg, rr.hashalg))
|
rrlist = sorted(rrlist, key=lambda rr: (rr.keyid, rr.keyalg, rr.hashalg))
|
||||||
|
|
||||||
@@ -128,6 +130,8 @@ def check(zone, args):
|
|||||||
fp, _ = Popen(cmd, stdin=PIPE, stdout=PIPE).communicate(intods)
|
fp, _ = Popen(cmd, stdin=PIPE, stdout=PIPE).communicate(intods)
|
||||||
|
|
||||||
for line in fp.splitlines():
|
for line in fp.splitlines():
|
||||||
|
if type(line) is not str:
|
||||||
|
line = line.decode('ascii')
|
||||||
klist.append(SECRR(line, args.lookaside))
|
klist.append(SECRR(line, args.lookaside))
|
||||||
|
|
||||||
if len(klist) < 1:
|
if len(klist) < 1:
|
||||||
|
@@ -43,6 +43,8 @@ class keyzone:
|
|||||||
fp, _ = Popen([czpath, "-o", "-", name, filename],
|
fp, _ = Popen([czpath, "-o", "-", name, filename],
|
||||||
stdout=PIPE, stderr=PIPE).communicate()
|
stdout=PIPE, stderr=PIPE).communicate()
|
||||||
for line in fp.splitlines():
|
for line in fp.splitlines():
|
||||||
|
if type(line) is not str:
|
||||||
|
line = line.decode('ascii')
|
||||||
if re.search('^[:space:]*;', line):
|
if re.search('^[:space:]*;', line):
|
||||||
continue
|
continue
|
||||||
fields = line.split()
|
fields = line.split()
|
||||||
|
Reference in New Issue
Block a user