From: Bob Halley Date: Tue, 20 Feb 2018 20:13:26 +0000 (-0800) Subject: Remove deprecated U option to open on python 3. X-Git-Tag: v1.16.0~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1c143605a92dff49c3dbf58e6d14097cd72db68a;p=thirdparty%2Fdnspython.git Remove deprecated U option to open on python 3. [Issue #252] --- diff --git a/dns/zone.py b/dns/zone.py index 37f23d3d..6606bef0 100644 --- a/dns/zone.py +++ b/dns/zone.py @@ -1021,7 +1021,10 @@ def from_file(f, origin=None, rdclass=dns.rdataclass.IN, """ str_type = string_types - opts = 'rU' + if PY3: + opts = 'rU' + else: + opts = 'r' if isinstance(f, str_type): if filename is None: