[CalendarServer-changes] [2072] CalendarServer/branches/users/cdaboo/timezones-2054/twistedcaldav/ timezones.py

source_changes at macosforge.org source_changes at macosforge.org
Fri Dec 14 11:26:52 PST 2007


Revision: 2072
          http://trac.macosforge.org/projects/calendarserver/changeset/2072
Author:   wsanchez at apple.com
Date:     2007-12-14 11:26:51 -0800 (Fri, 14 Dec 2007)

Log Message:
-----------
Don't store tzpath variable in case of error; just use tzStream.name when needed.

Modified Paths:
--------------
    CalendarServer/branches/users/cdaboo/timezones-2054/twistedcaldav/timezones.py

Modified: CalendarServer/branches/users/cdaboo/timezones-2054/twistedcaldav/timezones.py
===================================================================
--- CalendarServer/branches/users/cdaboo/timezones-2054/twistedcaldav/timezones.py	2007-12-14 02:26:04 UTC (rev 2071)
+++ CalendarServer/branches/users/cdaboo/timezones-2054/twistedcaldav/timezones.py	2007-12-14 19:26:51 UTC (rev 2072)
@@ -62,18 +62,17 @@
             return False
 
         tzStream = openTZ(tzid)
-        tzpath = tzStream.name
         try:
             calendar = Component.fromStream(tzStream)
         finally:
             tzStream.close()
 
         if calendar.name() != "VCALENDAR":
-            raise TimezoneException("%s does not contain valid iCalendar data." % (tzpath,))
+            raise TimezoneException("%s does not contain valid iCalendar data." % (tzStream.name,))
 
         # Check that we now have it cached
         if getTzid(tzid) == None:
-            raise TimezoneException("Could not read timezone %s from %s." % (tzid, tzpath,))
+            raise TimezoneException("Could not read timezone %s from %s." % (tzid, tzStream.name))
         
         return True
 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20071214/904df63c/attachment.html


More information about the calendarserver-changes mailing list