[CalendarServer-changes] [11111] CalendarServer/trunk/txdav/common/datastore/upgrade/sql
source_changes at macosforge.org
source_changes at macosforge.org
Mon Apr 29 11:30:47 PDT 2013
Revision: 11111
http://trac.calendarserver.org//changeset/11111
Author: sagen at apple.com
Date: 2013-04-29 11:30:47 -0700 (Mon, 29 Apr 2013)
Log Message:
-----------
Don't need stopOnFail anymore; that's taken care of via the StoreNotAvailable exception
Modified Paths:
--------------
CalendarServer/trunk/txdav/common/datastore/upgrade/sql/test/test_upgrade.py
CalendarServer/trunk/txdav/common/datastore/upgrade/sql/upgrade.py
Modified: CalendarServer/trunk/txdav/common/datastore/upgrade/sql/test/test_upgrade.py
===================================================================
--- CalendarServer/trunk/txdav/common/datastore/upgrade/sql/test/test_upgrade.py 2013-04-27 03:39:21 UTC (rev 11110)
+++ CalendarServer/trunk/txdav/common/datastore/upgrade/sql/test/test_upgrade.py 2013-04-29 18:30:47 UTC (rev 11111)
@@ -189,7 +189,7 @@
self.assertEqual(new_version, expected_version)
# Upgrade disallowed
- upgrader = UpgradeDatabaseSchemaStep(store, failIfUpgradeNeeded=True, stopOnFail=False)
+ upgrader = UpgradeDatabaseSchemaStep(store, failIfUpgradeNeeded=True)
yield _loadOldSchema(child)
old_version = yield _loadVersion()
try:
Modified: CalendarServer/trunk/txdav/common/datastore/upgrade/sql/upgrade.py
===================================================================
--- CalendarServer/trunk/txdav/common/datastore/upgrade/sql/upgrade.py 2013-04-27 03:39:21 UTC (rev 11110)
+++ CalendarServer/trunk/txdav/common/datastore/upgrade/sql/upgrade.py 2013-04-29 18:30:47 UTC (rev 11111)
@@ -43,7 +43,7 @@
@type sqlStore: L{txdav.idav.IDataStore}
"""
- def __init__(self, sqlStore, uid=None, gid=None, failIfUpgradeNeeded=False, stopOnFail=True):
+ def __init__(self, sqlStore, uid=None, gid=None, failIfUpgradeNeeded=False):
"""
Initialize the service.
"""
@@ -51,7 +51,6 @@
self.uid = uid
self.gid = gid
self.failIfUpgradeNeeded = failIfUpgradeNeeded
- self.stopOnFail = stopOnFail
self.schemaLocation = getModule(__name__).filePath.parent().parent().sibling("sql_schema")
self.pyLocation = getModule(__name__).filePath.parent()
@@ -87,8 +86,6 @@
self.log_error(msg)
raise RuntimeError(msg)
elif self.failIfUpgradeNeeded:
- if self.stopOnFail:
- reactor.stop()
# TODO: change this exception to be upgrade-specific
raise RuntimeError("Database upgrade is needed but not allowed.")
else:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20130429/661e8e0d/attachment.html>
More information about the calendarserver-changes
mailing list