[CalendarServer-changes] [10600] CalendarServer/trunk/twistedcaldav/scheduling/ischedule/utils.py

source_changes at macosforge.org source_changes at macosforge.org
Tue Jan 29 12:48:59 PST 2013


Revision: 10600
          http://trac.calendarserver.org//changeset/10600
Author:   cdaboo at apple.com
Date:     2013-01-29 12:48:58 -0800 (Tue, 29 Jan 2013)
Log Message:
-----------
Fix actual DNS lookup behavior as opposed to FakeResolver.

Modified Paths:
--------------
    CalendarServer/trunk/twistedcaldav/scheduling/ischedule/utils.py

Modified: CalendarServer/trunk/twistedcaldav/scheduling/ischedule/utils.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/scheduling/ischedule/utils.py	2013-01-29 20:39:57 UTC (rev 10599)
+++ CalendarServer/trunk/twistedcaldav/scheduling/ischedule/utils.py	2013-01-29 20:48:58 UTC (rev 10600)
@@ -58,7 +58,7 @@
     lookup = "%s._tcp.%s" % (service, domain,)
     log.debug("DNS SRV: lookup: %s" % (lookup,))
     try:
-        answers = (yield DebugResolver.lookupService(lookup))
+        answers = (yield DebugResolver.lookupService(lookup))[0]
     except (DomainError, AuthoritativeDomainError), e:
         log.debug("DNS SRV: lookup failed: %s" % (e,))
         returnValue(None)
@@ -117,7 +117,7 @@
     lookup = "%s.%s" % (prefix, domain,) if prefix else domain
     log.debug("DNS TXT: lookup: %s" % (lookup,))
     try:
-        answers = (yield DebugResolver.lookupText(lookup))
+        answers = (yield DebugResolver.lookupText(lookup))[0]
     except (DomainError, AuthoritativeDomainError), e:
         log.debug("DNS TXT: lookup failed: %s" % (e,))
         answers = ()
@@ -142,7 +142,7 @@
         log.debug("DNS FakeBindAuthority: lookup: %s %s %s" % (name, cls, type,))
         result = yield BindAuthority._lookup(self, name, cls, type, timeout)
         log.debug("DNS FakeBindAuthority: lookup results: %s %s %s\n%s" % (name, cls, type, result[0]))
-        returnValue(result[0])
+        returnValue(result)
 
 
     def stripComments(self, lines):
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20130129/eede8a9a/attachment.html>


More information about the calendarserver-changes mailing list