Commit 20f211f0 authored by Jim Fulton's avatar Jim Fulton

Now read site.zcml, to pick up module aliases.

Remove the index file after creation. I need to look at this some
more. Why is the saved alias file incorrect? Why isn't the bogosity
recognized when the file is opened?
parent 9acb99e8
......@@ -55,6 +55,11 @@ class ConversionApp:
self.parse_args(args)
def run(self):
# Load server-independent site config
from zope.configuration import xmlconfig
context = xmlconfig.file('site.zcml', execute=True)
if not os.path.exists(self.dbfile):
self.error("input database does not exist: %s" % self.dbfile)
base, ext = os.path.splitext(self.dbfile)
......@@ -71,6 +76,9 @@ class ConversionApp:
"please move aside and try again" % self.bakindex)
self.convert()
# XXX the conversion script leaves an invalid index behind. Why?
os.remove(self.dbindex)
def convert(self):
lock = LockFile(self.bakfile + ".lock")
try:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment