Changeset 1542 for trunk/packages/invirt-web/code
- Timestamp:
- Nov 6, 2008, 9:52:39 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/invirt-web/code/validation.py
r1495 r1542 274 274 try: 275 275 hostname = '%s.%s.' % (name, config.dns.domains[0]) 276 resolver = dns.resolver.Resolver() 277 resolver.nameservers = ['127.0.0.1'] 276 278 try: 277 dns.resolver.query(hostname, 'A')279 resolver.query(hostname, 'A') 278 280 except dns.resolver.NoAnswer, e: 279 281 # If we can get the TXT record, then we can verify it's 280 282 # reserved. If this lookup fails, let it bubble up and be 281 283 # dealt with 282 answer = dns.resolver.query(hostname, 'TXT')284 answer = resolver.query(hostname, 'TXT') 283 285 txt = answer[0].strings[0] 284 286 if txt.startswith('reserved'):
Note: See TracChangeset
for help on using the changeset viewer.