Correct storage module name in utils
darcs-hash:20061027112100-86b55-e6f83d2591a0aef653652c0bac188a10aa96ce2a.gz
This commit is contained in:
@@ -23,7 +23,7 @@
|
|||||||
import sys
|
import sys
|
||||||
sys.path.insert(0, "..")
|
sys.path.insert(0, "..")
|
||||||
import types
|
import types
|
||||||
import jabber.storage
|
import jmc.utils.storage
|
||||||
import os.path
|
import os.path
|
||||||
import re
|
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, "Usage: " + sys.argv[0] + " from_type from_db_file to_type to_db_file"
|
||||||
print >>sys.stderr, "Supported DB type are :"
|
print >>sys.stderr, "Supported DB type are :"
|
||||||
for var in [aclass
|
for var in [aclass
|
||||||
for aclass in dir(jabber.storage)
|
for aclass in dir(jmc.utils.storage)
|
||||||
if type(getattr(jabber.storage, aclass)) == types.ClassType \
|
if type(getattr(jmc.utils.storage, aclass)) == types.ClassType \
|
||||||
and re.compile(".+Storage$").match(aclass) is not None]:
|
and re.compile(".+Storage$").match(aclass) is not None]:
|
||||||
print >>sys.stderr, "\t" + var
|
print >>sys.stderr, "\t" + var
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
@@ -46,7 +46,7 @@ if not os.path.exists(from_file):
|
|||||||
print >>sys.stderr, from_file + " does not exist."
|
print >>sys.stderr, from_file + " does not exist."
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
from jabber.storage import *
|
from jmc.utils.storage import *
|
||||||
|
|
||||||
from_storage = None
|
from_storage = None
|
||||||
to_storage = None
|
to_storage = None
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
import sys
|
import sys
|
||||||
sys.path.insert(0, "..")
|
sys.path.insert(0, "..")
|
||||||
import types
|
import types
|
||||||
import jabber.storage
|
import jmc.utils.storage
|
||||||
import os.path
|
import os.path
|
||||||
import re
|
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, "Usage: " + sys.argv[0] + " db_type db_file"
|
||||||
print >>sys.stderr, "Supported DB type are :"
|
print >>sys.stderr, "Supported DB type are :"
|
||||||
for var in [aclass
|
for var in [aclass
|
||||||
for aclass in dir(jabber.storage)
|
for aclass in dir(jmc.utils.storage)
|
||||||
if type(getattr(jabber.storage, aclass)) == types.ClassType \
|
if type(getattr(jmc.utils.storage, aclass)) == types.ClassType \
|
||||||
and re.compile(".+Storage$").match(aclass) is not None]:
|
and re.compile(".+Storage$").match(aclass) is not None]:
|
||||||
print >>sys.stderr, "\t" + var
|
print >>sys.stderr, "\t" + var
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
@@ -45,7 +45,7 @@ if not os.path.exists(from_file):
|
|||||||
print >>sys.stderr, from_file + " does not exist."
|
print >>sys.stderr, from_file + " does not exist."
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
from jabber.storage import *
|
from jmc.utils.storage import *
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from_storage = globals()[from_storage_class + "Storage"](2, db_file = from_file)
|
from_storage = globals()[from_storage_class + "Storage"](2, db_file = from_file)
|
||||||
|
|||||||
Reference in New Issue
Block a user