[CalendarServer-changes] [4492] CalendarServer/trunk/twistedcaldav/localization.py

source_changes at macosforge.org source_changes at macosforge.org
Wed Aug 12 11:26:26 PDT 2009


Revision: 4492
          http://trac.macosforge.org/projects/calendarserver/changeset/4492
Author:   dre at apple.com
Date:     2009-08-12 11:26:25 -0700 (Wed, 12 Aug 2009)
Log Message:
-----------
Added check for writability of gnuRoot; handles case where server has never been started out of launchd.

Modified Paths:
--------------
    CalendarServer/trunk/twistedcaldav/localization.py

Modified: CalendarServer/trunk/twistedcaldav/localization.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/localization.py	2009-08-12 17:06:55 UTC (rev 4491)
+++ CalendarServer/trunk/twistedcaldav/localization.py	2009-08-12 18:26:25 UTC (rev 4492)
@@ -360,7 +360,12 @@
 
         # Make sure the gnutext translations directory exists
         if not os.path.exists(gnuRoot):
-            os.mkdir(gnuRoot)
+            try:
+                os.mkdir(gnuRoot)
+            except OSError:
+                log.warn("Could not create gnuttext translation directory: %s"
+                    % (gnuRoot,))
+                return
 
         # Scan for Apple translations (directories ending in .lproj)
         for item in os.listdir(lprojRoot):
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20090812/11b26c62/attachment.html>


More information about the calendarserver-changes mailing list