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