Commit 52a669ae authored by Grégory Wisniewski's avatar Grégory Wisniewski

Update neomigrate import/export script with the current log system.


git-svn-id: https://svn.erp5.org/repos/neo/trunk@1373 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 19c21639
......@@ -23,10 +23,7 @@ import logging
import time
import os
from ZODB.FileStorage import FileStorage
#from ZEO.ClientStorage import ClientStorage as ZEOStorage
from neo.client.Storage import Storage as NEOStorage
from neo import setupLog
# register options
parser = OptionParser()
......@@ -43,7 +40,6 @@ source = options.source or None
destination = options.destination or None
name = options.name or None
connector = options.connector or 'SocketConnector'
verbose = options.verbose or False
# check options
if source is None or destination is None:
......@@ -52,12 +48,12 @@ if name is None:
raise RuntimeError('The NEO cluster name must be supplied')
# set up logging
if verbose:
logging.basicConfig(level=logging.DEBUG)
else:
logging.basicConfig(level=logging.INFO)
setupLog('neomigrate', None, options.verbose or False)
# open storages
from ZODB.FileStorage import FileStorage
#from ZEO.ClientStorage import ClientStorage as ZEOStorage
from neo.client.Storage import Storage as NEOStorage
neo_args = { 'connector': connector, 'name': name, }
if os.path.exists(source):
src = FileStorage(file_name=source)
......
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