[Checkins]
SVN: CMF/branches/2.1/CMFCore/Extensions/migrateToCMF21.py
We need to call setSite to make sure we have a site with a
proper acquisition context.
Wichert Akkerman
wichert at wiggy.net
Thu Jul 12 11:45:57 EDT 2007
Log message for revision 77760:
We need to call setSite to make sure we have a site with a proper acquisition context.
Changed:
U CMF/branches/2.1/CMFCore/Extensions/migrateToCMF21.py
-=-
Modified: CMF/branches/2.1/CMFCore/Extensions/migrateToCMF21.py
===================================================================
--- CMF/branches/2.1/CMFCore/Extensions/migrateToCMF21.py 2007-07-12 15:41:04 UTC (rev 77759)
+++ CMF/branches/2.1/CMFCore/Extensions/migrateToCMF21.py 2007-07-12 15:45:56 UTC (rev 77760)
@@ -18,6 +18,7 @@
"""
from zope.component import getSiteManager
+from zope.app.component.hooks import setSite
from zope.dottedname.resolve import resolve
from logging import getLogger
import sys
@@ -54,6 +55,7 @@
logger.info(msg)
print msg
+
def migrate_site(site):
""" Migrate a single site
"""
@@ -62,6 +64,10 @@
_log(' - converting site at %s' % site_path)
ps = site.portal_setup
+ # We have to call setSite to make sure we have a site with a proper
+ # acquisition context.
+ setSite(site)
+
# First we remove utility registrations that are no longer
# needed.
sm = getSiteManager(site)
More information about the Checkins
mailing list