Correct storage module name in utils

darcs-hash:20061027112100-86b55-e6f83d2591a0aef653652c0bac188a10aa96ce2a.gz
This commit is contained in:
David Rousselie
2006-10-27 13:21:00 +02:00
parent 18d1963b5c
commit 02f5ba536b
2 changed files with 8 additions and 8 deletions

View File

@@ -23,7 +23,7 @@
import sys
sys.path.insert(0, "..")
import types
import jabber.storage
import jmc.utils.storage
import os.path
import re
@@ -31,8 +31,8 @@ if len(sys.argv) != 5:
print >>sys.stderr, "Usage: " + sys.argv[0] + " from_type from_db_file to_type to_db_file"
print >>sys.stderr, "Supported DB type are :"
for var in [aclass
for aclass in dir(jabber.storage)
if type(getattr(jabber.storage, aclass)) == types.ClassType \
for aclass in dir(jmc.utils.storage)
if type(getattr(jmc.utils.storage, aclass)) == types.ClassType \
and re.compile(".+Storage$").match(aclass) is not None]:
print >>sys.stderr, "\t" + var
sys.exit(1)
@@ -46,7 +46,7 @@ if not os.path.exists(from_file):
print >>sys.stderr, from_file + " does not exist."
sys.exit(1)
from jabber.storage import *
from jmc.utils.storage import *
from_storage = None
to_storage = None

View File

@@ -23,7 +23,7 @@
import sys
sys.path.insert(0, "..")
import types
import jabber.storage
import jmc.utils.storage
import os.path
import re
@@ -32,8 +32,8 @@ if len(sys.argv) != 3:
print >>sys.stderr, "Usage: " + sys.argv[0] + " db_type db_file"
print >>sys.stderr, "Supported DB type are :"
for var in [aclass
for aclass in dir(jabber.storage)
if type(getattr(jabber.storage, aclass)) == types.ClassType \
for aclass in dir(jmc.utils.storage)
if type(getattr(jmc.utils.storage, aclass)) == types.ClassType \
and re.compile(".+Storage$").match(aclass) is not None]:
print >>sys.stderr, "\t" + var
sys.exit(1)
@@ -45,7 +45,7 @@ if not os.path.exists(from_file):
print >>sys.stderr, from_file + " does not exist."
sys.exit(1)
from jabber.storage import *
from jmc.utils.storage import *
try:
from_storage = globals()[from_storage_class + "Storage"](2, db_file = from_file)