Codebase list dnspython / b2b6558
Imported Upstream version 1.6.0 SVN-Git Migration 8 years ago
100 changed file(s) with 249 addition(s) and 124 deletion(s). Raw diff Collapse all Expand all
Binary diff not shown
Binary diff not shown
0
1 2007-11-25 Bob Halley <halley@dnspython.org
2
3 * dns/query.py (_wait_for): if select() raises an exception due to
4 EINTR, we should just select() again.
5
6 2007-06-13 Bob Halley <halley@dnspython.org>
7
8 * dns/inet.py: Added is_multicast().
9
10 * dns/query.py (udp): If the queried address is a multicast address, then
11 don't check that the address of the response is the same as the address
12 queried.
13
14 2007-05-24 Bob Halley <halley@dnspython.org>
15
16 * dns/rdtypes/IN/NAPTR.py: NAPTR comparisons didn't compare the
17 preference field due to a typo.
18
19 2007-02-07 Bob Halley <halley@dnspython.org>
20
21 * dns/resolver.py: Integrate code submitted by Paul Marks to
22 determine whether a Windows NIC is enabled. The way dnspython
23 used to do this does not work on Windows Vista.
24
25 2006-12-10 Bob Halley <halley@dnspython.org>
26
27 * (Version 1.5.0 released)
28
029 2006-11-03 Bob Halley <halley@dnspython.org>
130
231 * dns/rdtypes/IN/DHCID.py: Added support for the DHCID RR type.
00 Metadata-Version: 1.1
11 Name: dnspython
2 Version: 1.5.0
2 Version: 1.6.0
33 Summary: DNS toolkit
44 Home-page: http://www.dnspython.org
55 Author: Bob Halley
66 Author-email: halley@dnspython.org
77 License: BSD-like
8 Download-URL: http://www.dnspython.org/kits/dnspython-1.5.0.tar.gz
8 Download-URL: http://www.dnspython.org/kits/1.6.0/dnspython-1.6.0.tar.gz
99 Description: dnspython is a DNS toolkit for Python. It supports almost all
1010 record types. It can be used for queries, zone transfers, and dynamic
1111 updates. It supports TSIG authenticated messages and EDNS0.
2121
2222 ABOUT THIS RELEASE
2323
24 This is dnspython 1.5.0.
24 This is dnspython 1.6.0.
25
26 New since 1.5.0:
27 Added dns.inet.is_multicast().
28
29 Bugs fixed since 1.5.0:
30
31 If select() raises an exception due to EINTR, we should just
32 select() again.
33
34 If the queried address is a multicast address, then don't
35 check that the address of the response is the same as the
36 address queried.
37
38 NAPTR comparisons didn't compare the preference field due to a
39 typo.
40
41 Testing of whether a Windows NIC is enabled now works on Vista
42 thanks to code contributed by Paul Marks.
2543
2644 New since 1.4.0:
2745
Binary diff not shown
Binary diff not shown
Binary diff not shown
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2005 Nominum, Inc.
0 # Copyright (C) 2006, 2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2001-2005 Nominum, Inc.
0 # Copyright (C) 2001-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
8787 return AF_INET6
8888 except:
8989 raise ValueError
90
91 def is_multicast(text):
92 """Is the textual-form network address a multicast address?
93
94 @param text: the textual address
95 @raises ValueError: the address family cannot be determined from the input.
96 @rtype: bool
97 """
98 try:
99 first = ord(dns.ipv4.inet_aton(text)[0])
100 return (first >= 224 and first <= 239)
101 except:
102 try:
103 first = ord(dns.ipv6.inet_aton(text)[0])
104 return (first == 255)
105 except:
106 raise ValueError
107
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2001-2005 Nominum, Inc.
0 # Copyright (C) 2001-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2001-2005 Nominum, Inc.
0 # Copyright (C) 2001-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2001-2005 Nominum, Inc.
0 # Copyright (C) 2001-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2001-2005 Nominum, Inc.
0 # Copyright (C) 2001-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
4343 return None
4444 else:
4545 return time.time() + timeout
46
46
4747 def _wait_for(ir, iw, ix, expiration):
48 if expiration is None:
49 timeout = None
50 else:
51 timeout = expiration - time.time()
52 if timeout <= 0.0:
48 done = False
49 while not done:
50 if expiration is None:
51 timeout = None
52 else:
53 timeout = expiration - time.time()
54 if timeout <= 0.0:
55 raise dns.exception.Timeout
56 try:
57 if timeout is None:
58 (r, w, x) = select.select(ir, iw, ix)
59 else:
60 (r, w, x) = select.select(ir, iw, ix, timeout)
61 except select.error, e:
62 if e.args[0] != errno.EINTR:
63 raise e
64 done = True
65 if len(r) == 0 and len(w) == 0 and len(x) == 0:
5366 raise dns.exception.Timeout
54 if timeout is None:
55 (r, w, x) = select.select(ir, iw, ix)
56 else:
57 (r, w, x) = select.select(ir, iw, ix, timeout)
58 if len(r) == 0 and len(w) == 0 and len(x) == 0:
59 raise dns.exception.Timeout
60
67
6168 def _wait_for_readable(s, expiration):
6269 _wait_for([s], [], [s], expiration)
63
70
6471 def _wait_for_writable(s, expiration):
6572 _wait_for([], [s], [s], expiration)
6673
9097 @param ignore_unexpected: If True, ignore responses from unexpected
9198 sources. The default is False.
9299 @type ignore_unexpected: bool"""
93
100
94101 wire = q.to_wire()
95102 if af is None:
96103 try:
116123 while 1:
117124 _wait_for_readable(s, expiration)
118125 (wire, from_address) = s.recvfrom(65535)
119 if from_address == destination:
126 if from_address == destination or \
127 (dns.inet.is_multicast(where) and \
128 from_address[1] == destination[1]):
120129 break
121130 if not ignore_unexpected:
122131 raise UnexpectedSource, \
188197 @param source_port: The port from which to send the message.
189198 The default is 0.
190199 @type source_port: int"""
191
200
192201 wire = q.to_wire()
193202 if af is None:
194203 try:
0 # Copyright (C) 2001-2005 Nominum, Inc.
0 # Copyright (C) 2001-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2001-2005 Nominum, Inc.
0 # Copyright (C) 2001-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2001-2005 Nominum, Inc.
0 # Copyright (C) 2001-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2001-2005 Nominum, Inc.
0 # Copyright (C) 2001-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2001-2005 Nominum, Inc.
0 # Copyright (C) 2001-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2004, 2005 Nominum, Inc.
0 # Copyright (C) 2004-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2004, 2005 Nominum, Inc.
0 # Copyright (C) 2004-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2004, 2005 Nominum, Inc.
0 # Copyright (C) 2004-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2006 Nominum, Inc.
0 # Copyright (C) 2006, 2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2005 Nominum, Inc.
0 # Copyright (C) 2005-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2006 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
Binary diff not shown
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2006 Nominum, Inc.
0 # Copyright (C) 2006, 2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2006 Nominum, Inc.
0 # Copyright (C) 2006, 2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
118118
119119 def _cmp(self, other):
120120 sp = struct.pack("!HH", self.order, self.preference)
121 op = struct.pack("!HH", other.order, self.preference)
121 op = struct.pack("!HH", other.order, other.preference)
122122 v = cmp(sp, op)
123123 if v == 0:
124124 v = cmp(self.flags, other.flags)
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2004, 2005 Nominum, Inc.
0 # Copyright (C) 2004-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2004, 2005 Nominum, Inc.
0 # Copyright (C) 2004-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2006, 2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2001-2005 Nominum, Inc.
0 # Copyright (C) 2001-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
452452 guid = _winreg.EnumKey(interfaces, i)
453453 i += 1
454454 key = _winreg.OpenKey(interfaces, guid)
455 if not self._win32_is_nic_enabled(lm, guid, key):
456 continue
455457 try:
456 # enabled interfaces seem to have a non-empty
457 # NTEContextList
458 try:
459 (nte, ttype) = _winreg.QueryValueEx(key,
460 'NTEContextList')
461 except WindowsError:
462 nte = None
463 if nte:
464 self._config_win32_fromkey(key)
458 self._config_win32_fromkey(key)
465459 finally:
466460 key.Close()
467461 except EnvironmentError:
470464 interfaces.Close()
471465 finally:
472466 lm.Close()
467
468 def _win32_is_nic_enabled(self, lm, guid, interface_key):
469 # Look in the Windows Registry to determine whether the network
470 # interface corresponding to the given guid is enabled.
471 #
472 # (Code contributed by Paul Marks, thanks!)
473 #
474 try:
475 # This hard-coded location seems to be consistent, at least
476 # from Windows 2000 through Vista.
477 connection_key = _winreg.OpenKey(
478 lm,
479 r'SYSTEM\CurrentControlSet\Control\Network'
480 r'\{4D36E972-E325-11CE-BFC1-08002BE10318}'
481 r'\%s\Connection' % guid)
482
483 try:
484 # The PnpInstanceID points to a key inside Enum
485 (pnp_id, ttype) = _winreg.QueryValueEx(
486 connection_key, 'PnpInstanceID')
487
488 if ttype != _winreg.REG_SZ:
489 raise ValueError
490
491 device_key = _winreg.OpenKey(
492 lm, r'SYSTEM\CurrentControlSet\Enum\%s' % pnp_id)
493
494 try:
495 # Get ConfigFlags for this device
496 (flags, ttype) = _winreg.QueryValueEx(
497 device_key, 'ConfigFlags')
498
499 if ttype != _winreg.REG_DWORD:
500 raise ValueError
501
502 # Based on experimentation, bit 0x1 indicates that the
503 # device is disabled.
504 return not (flags & 0x1)
505
506 finally:
507 device_key.Close()
508 finally:
509 connection_key.Close()
510 except (EnvironmentError, ValueError):
511 # Pre-vista, enabled interfaces seem to have a non-empty
512 # NTEContextList; this was how dnspython detected enabled
513 # nics before the code above was contributed. We've retained
514 # the old method since we don't know if the code above works
515 # on Windows 95/98/ME.
516 try:
517 (nte, ttype) = _winreg.QueryValueEx(interface_key,
518 'NTEContextList')
519 return nte is not None
520 except WindowsError:
521 return False
473522
474523 def _compute_timeout(self, start):
475524 now = time.time()
0 # Copyright (C) 2005 Nominum, Inc.
0 # Copyright (C) 2006, 2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003, 2004 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2001-2005 Nominum, Inc.
0 # Copyright (C) 2001-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
1515 """dnspython release version information."""
1616
1717 MAJOR = 1
18 MINOR = 5
18 MINOR = 6
1919 MICRO = 0
2020 RELEASELEVEL = 0x0f
2121 SERIAL = 0
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
2424 import dns.rdataclass
2525 import dns.rdatatype
2626 import dns.rdata
27 import dns.rrset
2728 import dns.tokenizer
2829 import dns.ttl
2930
00 #!/usr/bin/env python
11 #
2 # Copyright (C) 2003-2006 Nominum, Inc.
2 # Copyright (C) 2003-2007 Nominum, Inc.
33 #
44 # Permission to use, copy, modify, and distribute this software and its
55 # documentation for any purpose with or without fee is hereby granted,
1717 import sys
1818 from distutils.core import setup
1919
20 version = '1.5.0'
20 version = '1.6.0'
2121
2222 kwargs = {
2323 'name' : 'dnspython',
4141
4242 if sys.hexversion >= 0x02020300:
4343 kwargs['download_url'] = \
44 'http://www.dnspython.org/kits/dnspython-%s.tar.gz' % version
44 'http://www.dnspython.org/kits/%s/dnspython-%s.tar.gz' % (version,
45 version)
4546 kwargs['classifiers'] = [
4647 "Development Status :: 5 - Production/Stable",
4748 "Intended Audience :: Developers",
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2005 Nominum, Inc.
0 # Copyright (C) 2006, 2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003, 2004 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,
0 # Copyright (C) 2003-2005 Nominum, Inc.
0 # Copyright (C) 2003-2007 Nominum, Inc.
11 #
22 # Permission to use, copy, modify, and distribute this software and its
33 # documentation for any purpose with or without fee is hereby granted,