]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
Add ChangeLog entry for resolver.rotate
authorBob Halley <halley@dnspython.org>
Sat, 21 Jun 2014 16:13:57 +0000 (09:13 -0700)
committerBob Halley <halley@dnspython.org>
Sat, 21 Jun 2014 16:13:57 +0000 (09:13 -0700)
Tweak options processing for greater flexibility

ChangeLog
dns/resolver.py

index 6e9e86d52181cf4c8a123cf60a36b30c70514aa6..f210688186ccb941d13ec7c65f22a090241d88b8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,13 @@
     * Added dns.zone.to_text() convenience method.  Thanks to Brandon Whaley
       <redkrieg@gmail.com> for the patch.
 
+    * The /etc/resolv.conf setting "options rotate" is now understood by the
+      resolver.  If present, the resolver will shuffle the nameserver list
+      each time dns.resolver.query() is called.  Thanks to underrun for the
+      patch.  Note that you don't want to add "options rotate" to your
+      /etc/resolv.conf if your system's resolver library does not understand
+      it.  In this case, just set resolver.rotate = True by hand.
+
 2014-06-19  Bob Halley  <halley@dnspython.org>
 
     * Escaping of Unicode has been corrected.  Previously we escaped and
index 88419e959fea1e27bd338c5156f347fe4bcf3b6e..f52b55560c41fd57ef793a7c0802b3ae3e6f72e3 100644 (file)
@@ -541,7 +541,7 @@ class Resolver(object):
                     for suffix in tokens[1:]:
                         self.search.append(dns.name.from_text(suffix))
                 elif tokens[0] == 'options':
-                    if len(tokens) == 2 and tokens[1] == 'rotate':
+                    if 'rotate' in tokens[1:]:
                         self.rotate = True
         finally:
             if want_close: