diff --git a/bin/python/isc/checkds.py.in b/bin/python/isc/checkds.py.in index cac226ee4d..b5cbe3fd05 100644 --- a/bin/python/isc/checkds.py.in +++ b/bin/python/isc/checkds.py.in @@ -107,6 +107,8 @@ def check(zone, args): fp, _ = Popen(cmd, stdout=PIPE).communicate() for line in fp.splitlines(): + if type(line) is not str: + line = line.decode('ascii') rrlist.append(SECRR(line, args.lookaside)) 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) for line in fp.splitlines(): + if type(line) is not str: + line = line.decode('ascii') klist.append(SECRR(line, args.lookaside)) if len(klist) < 1: diff --git a/bin/python/isc/keyzone.py.in b/bin/python/isc/keyzone.py.in index 2451d439e4..bc8c51d72f 100644 --- a/bin/python/isc/keyzone.py.in +++ b/bin/python/isc/keyzone.py.in @@ -43,6 +43,8 @@ class keyzone: fp, _ = Popen([czpath, "-o", "-", name, filename], stdout=PIPE, stderr=PIPE).communicate() for line in fp.splitlines(): + if type(line) is not str: + line = line.decode('ascii') if re.search('^[:space:]*;', line): continue fields = line.split()