]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
Remove deprecated U option to open on python 3.
authorBob Halley <halley@dnspython.org>
Tue, 20 Feb 2018 20:13:26 +0000 (12:13 -0800)
committerBob Halley <halley@dnspython.org>
Tue, 20 Feb 2018 20:13:26 +0000 (12:13 -0800)
[Issue #252]

dns/zone.py

index 37f23d3d362f247cc5a7ef4622b5edaa40434010..6606bef0e314d7a7064d530113fb1aa0d6de41bf 100644 (file)
@@ -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: