[CalendarServer-changes] [3705] CalendarServer/trunk/twistedcaldav/config.py
source_changes at macosforge.org
source_changes at macosforge.org
Fri Feb 20 23:24:20 PST 2009
Revision: 3705
http://trac.macosforge.org/projects/calendarserver/changeset/3705
Author: darla at apple.com
Date: 2009-02-20 23:24:18 -0800 (Fri, 20 Feb 2009)
Log Message:
-----------
Deleting any stray socket files found on startup so the server can start normally.
Modified Paths:
--------------
CalendarServer/trunk/twistedcaldav/config.py
Modified: CalendarServer/trunk/twistedcaldav/config.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/config.py 2009-02-20 22:31:29 UTC (rev 3704)
+++ CalendarServer/trunk/twistedcaldav/config.py 2009-02-21 07:24:18 UTC (rev 3705)
@@ -26,6 +26,7 @@
import os
import copy
import re
+import stat
from twisted.web2.dav import davxml
from twisted.web2.dav.resource import TwistedACLInheritable
@@ -430,6 +431,7 @@
self.updateRejectClients,
self.updateDropBox,
self.updateLogLevels,
+ self.updateControlSocket,
self.updateNotifications,
self.updateScheduling,
]
@@ -599,6 +601,17 @@
except InvalidLogLevelError, e:
raise ConfigurationError("Invalid log level: %s" % (e.level))
+ @staticmethod
+ def updateControlSocket(self, items):
+
+ # Make sure no old socket files are lying around.
+ if (os.path.exists(self.ControlSocket)):
+ # See if the file represents an active socket.
+ # If not, delete it.
+ if (not stat.S_ISSOCK(os.stat(self.ControlSocket).st_mode)):
+ log.warn("Deleting stale socket file: %s" % self.ControlSocket)
+ os.remove(self.ControlSocket)
+
def updateDefaults(self, items):
_mergeData(self._defaults, items)
self.update(items)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20090220/ebac7b68/attachment-0001.html>
More information about the calendarserver-changes
mailing list