[CalendarServer-changes] [5309] CalendarServer/trunk/calendarserver/tap/caldav.py
source_changes at macosforge.org
source_changes at macosforge.org
Mon Mar 15 13:00:30 PDT 2010
Revision: 5309
http://trac.macosforge.org/projects/calendarserver/changeset/5309
Author: wsanchez at apple.com
Date: 2010-03-15 13:00:30 -0700 (Mon, 15 Mar 2010)
Log Message:
-----------
Invalid group name raises ConfigurationError. Tap code catches that and exits.
Modified Paths:
--------------
CalendarServer/trunk/calendarserver/tap/caldav.py
Modified: CalendarServer/trunk/calendarserver/tap/caldav.py
===================================================================
--- CalendarServer/trunk/calendarserver/tap/caldav.py 2010-03-15 19:59:17 UTC (rev 5308)
+++ CalendarServer/trunk/calendarserver/tap/caldav.py 2010-03-15 20:00:30 UTC (rev 5309)
@@ -454,7 +454,11 @@
- service = serviceMethod(options)
+ try:
+ service = serviceMethod(options)
+ except ConfigurationError, e:
+ sys.stderr.write("Configuration error: %s\n" % (e,))
+ sys.exit(1)
#
# Note: if there is a stopped process in the same session
@@ -698,7 +702,10 @@
RotatingFileAccessLoggingObserver(config.AccessLogFile)
)
if config.GroupName:
- gid = getgrnam(config.GroupName).gr_gid
+ try:
+ gid = getgrnam(config.GroupName).gr_gid
+ except KeyError, e:
+ raise ConfigurationError("Invalid group name: %s" % (config.GroupName,))
else:
gid = os.getgid()
if config.ControlSocket:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100315/526b1047/attachment.html>
More information about the calendarserver-changes
mailing list