pass sql list from fpdb through guibulkimport to fpdb_import

This commit is contained in:
sqlcoder
2009-07-29 06:37:06 +01:00
parent 9c62ecb80e
commit 38ee98e492
3 changed files with 9 additions and 7 deletions
+4 -3
View File
@@ -34,6 +34,7 @@ import Configuration
class GuiBulkImport():
# not used
def import_dir(self):
"""imports a directory, non-recursive. todo: move this to fpdb_import so CLI can use it"""
@@ -80,7 +81,7 @@ class GuiBulkImport():
ttime = time() - starttime
if ttime == 0:
ttime = 1
print 'GuiBulkImport.import_dir done: Stored: %d \tDuplicates: %d \tPartial: %d \tErrors: %d in %s seconds - %d/sec'\
print 'GuiBulkImport.load done: Stored: %d \tDuplicates: %d \tPartial: %d \tErrors: %d in %s seconds - %d/sec'\
% (stored, dups, partial, errs, ttime, stored / ttime)
self.importer.clearFileList()
@@ -96,10 +97,10 @@ class GuiBulkImport():
"""returns the vbox of this thread"""
return self.vbox
def __init__(self, settings, config):
def __init__(self, settings, config, sql = None):
self.settings = settings
self.config = config
self.importer = fpdb_import.Importer(self, self.settings, config)
self.importer = fpdb_import.Importer(self, self.settings, config, sql)
self.vbox = gtk.VBox(False, 0)
self.vbox.show()