From 6d19d975c6ce91ed3b2b13c2a3221bd6686f4128 Mon Sep 17 00:00:00 2001 From: Evan Hunt Date: Thu, 20 Apr 2017 17:30:35 -0700 Subject: [PATCH] [master] python 3 compatibility 4591. [port] Addressed some python 3 compatibility issues. Thanks to Ville Skytta. [RT #44955] [RT #44956] --- CHANGES | 3 +++ bin/python/isc/coverage.py.in | 2 +- bin/tests/system/dnstap/ydump.py | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 1550160bc2..9f91f992eb 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +4591. [port] Addressed some python 3 compatibility issues. + Thanks to Ville Skytta. [RT #44955] [RT #44956] + 4590. [bug] Support for PTHREAD_MUTEX_ADAPTIVE_NP was not being properly detected. [RT #44871] diff --git a/bin/python/isc/coverage.py.in b/bin/python/isc/coverage.py.in index 00eb9e05f1..9d06b9c200 100644 --- a/bin/python/isc/coverage.py.in +++ b/bin/python/isc/coverage.py.in @@ -73,7 +73,7 @@ def parse_time(s): pass # try to parse as a number with a suffix indicating unit of time - r = re.compile('([0-9][0-9]*)\s*([A-Za-z]*)') + r = re.compile(r'([0-9][0-9]*)\s*([A-Za-z]*)') m = r.match(s) if not m: raise ValueError("Cannot parse %s" % s) diff --git a/bin/tests/system/dnstap/ydump.py b/bin/tests/system/dnstap/ydump.py index 04d0bc4791..971f1c2f7b 100644 --- a/bin/tests/system/dnstap/ydump.py +++ b/bin/tests/system/dnstap/ydump.py @@ -9,7 +9,7 @@ try: import yaml except: - print "I: No python yaml module, skipping" + print("I: No python yaml module, skipping") exit(1) import subprocess