[CalendarServer-changes] [7175] CalendarServer/trunk/twistedcaldav/notify.py
source_changes at macosforge.org
source_changes at macosforge.org
Thu Mar 10 10:09:30 PST 2011
Revision: 7175
http://trac.macosforge.org/projects/calendarserver/changeset/7175
Author: sagen at apple.com
Date: 2011-03-10 10:09:29 -0800 (Thu, 10 Mar 2011)
Log Message:
-----------
Handle XMPP failures that aren't accompanied by an XML response (may be a disconnection)
Modified Paths:
--------------
CalendarServer/trunk/twistedcaldav/notify.py
Modified: CalendarServer/trunk/twistedcaldav/notify.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/notify.py 2011-03-10 17:28:32 UTC (rev 7174)
+++ CalendarServer/trunk/twistedcaldav/notify.py 2011-03-10 18:09:29 UTC (rev 7175)
@@ -722,7 +722,13 @@
self.sendDebug("Node publish failed (%s)" % (nodeName,), iq)
# Don't know how to proceed
self.unlockNode(None, nodeName)
+ except AttributeError:
+ # We did not get an XML response; most likely it was a disconnection
+ self.unlockNode(None, nodeName)
+ # Don't re-raise, just unlock and ignore
except:
+ # Note: this block is not a "finally" because in the case of a 404
+ # we don't want to unlock yet
self.unlockNode(None, nodeName)
raise
@@ -908,6 +914,9 @@
self.log_error("PubSub node configuration error: %s" %
(iq.toXml().encode('ascii', 'replace')),)
self.sendError("Failed to configure node (%s)" % (nodeName,), iq)
+ except AttributeError:
+ # We did not get an XML response; most likely it was a disconnection
+ pass
finally:
self.unlockNode(None, nodeName)
@@ -944,6 +953,9 @@
self.log_error("PubSub node delete error: %s" %
(iq.toXml().encode('ascii', 'replace')),)
self.sendDebug("Node delete failed (%s)" % (nodeName,), iq)
+ except AttributeError:
+ # We did not get an XML response; most likely it was a disconnection
+ pass
finally:
self.unlockNode(None, nodeName)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20110310/e08f55bd/attachment.html>
More information about the calendarserver-changes
mailing list