summaryrefslogtreecommitdiff
path: root/gen_tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'gen_tests.py')
-rw-r--r--gen_tests.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/gen_tests.py b/gen_tests.py
index cff1204..5ba0648 100644
--- a/gen_tests.py
+++ b/gen_tests.py
@@ -28,14 +28,14 @@ def main():
# files and will output historical records we can't cope with
# otherwise.
command = [zdump, '-v', '-c', '1902,2038', zone]
- zd_out = subprocess.check_output(command)
+ zd_out = subprocess.check_output(command, encoding="utf8")
# Skip bogus output on 64bit architectures, per Bug #213816
lines = [
line.strip() for line in zd_out.splitlines()
- if not line.decode('utf-8').strip().endswith('NULL')]
+ if not line.strip().endswith('NULL')]
for line in lines:
- print >> datf, line
+ print(line, file=datf)
datf.flush()
datf.close()