diff options
author | Bob Halley <halley@dnspython.org> | 2014-06-21 09:13:57 -0700 |
---|---|---|
committer | Bob Halley <halley@dnspython.org> | 2014-06-21 09:13:57 -0700 |
commit | 5bb31eb605b0109d02d6037098983b06e3b2ca98 (patch) | |
tree | 7f53aa9c3e82d32a643878d4eaf93e186b288605 | |
parent | 00448303c855cfdad4506ed77090e63d67e1e10f (diff) | |
download | dnspython-5bb31eb605b0109d02d6037098983b06e3b2ca98.tar.gz |
Add ChangeLog entry for resolver.rotate
Tweak options processing for greater flexibility
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | dns/resolver.py | 2 |
2 files changed, 8 insertions, 1 deletions
@@ -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 diff --git a/dns/resolver.py b/dns/resolver.py index 88419e9..f52b555 100644 --- a/dns/resolver.py +++ b/dns/resolver.py @@ -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: |