[CalendarServer-changes] [3461] CalendarServer/trunk/twistedcaldav/sql.py
source_changes at macosforge.org
source_changes at macosforge.org
Thu Dec 4 16:03:59 PST 2008
Revision: 3461
http://trac.macosforge.org/projects/calendarserver/changeset/3461
Author: sagen at apple.com
Date: 2008-12-04 16:03:58 -0800 (Thu, 04 Dec 2008)
Log Message:
-----------
Not a good idea to rebind the symbol "type"
Modified Paths:
--------------
CalendarServer/trunk/twistedcaldav/sql.py
Modified: CalendarServer/trunk/twistedcaldav/sql.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/sql.py 2008-12-04 22:01:10 UTC (rev 3460)
+++ CalendarServer/trunk/twistedcaldav/sql.py 2008-12-05 00:03:58 UTC (rev 3461)
@@ -109,11 +109,11 @@
select VALUE from CALDAV
where KEY = 'TYPE'
""")
- type = q.fetchone()
+ dbtype = q.fetchone()
- if type is not None: type = type[0]
+ if dbtype is not None: dbtype = dbtype[0]
- if (version != self._db_version()) or (type != self._db_type()):
+ if (version != self._db_version()) or (dbtype != self._db_type()):
# Clean-up first
q.close()
@@ -128,9 +128,9 @@
# Upgrade the DB
return self._db_upgrade(version)
- if type != self._db_type():
+ if dbtype != self._db_type():
log.err("Database %s has different type (%s vs. %s)"
- % (db_filename, type, self._db_type()))
+ % (db_filename, dbtype, self._db_type()))
# Delete this index and start over
os.remove(db_filename)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20081204/cb4c0ce8/attachment-0001.html>
More information about the calendarserver-changes
mailing list