removed redundant db variable

This commit is contained in:
sqlcoder 2009-05-02 21:07:52 +01:00
parent 7d28f70a98
commit 882f19a34d
2 changed files with 3 additions and 6 deletions

View File

@ -30,7 +30,6 @@ import gtk
# fpdb/FreePokerTools modules
import fpdb_simple
import fpdb_import
import fpdb_db
import Configuration
class GuiBulkImport():
@ -83,8 +82,7 @@ class GuiBulkImport():
"""returns the vbox of this thread"""
return self.vbox
def __init__(self, db, settings, config):
self.db = db # this is an instance of fpdb_db
def __init__(self, settings, config):
self.settings = settings
self.config = config
self.importer = fpdb_import.Importer(self, self.settings,
@ -227,7 +225,6 @@ def main(argv=None):
(options, sys.argv) = parser.parse_args(args = argv)
config = Configuration.Config()
db = None
settings = {}
settings['minPrint'] = options.minPrint
@ -243,7 +240,7 @@ def main(argv=None):
print '-q is deprecated. Just use "-f filename" instead'
# This is because -q on its own causes an error, so -f is necessary and sufficient for cmd line use
if not options.filename:
i = GuiBulkImport(db, settings, config)
i = GuiBulkImport(settings, config)
main_window = gtk.Window()
main_window.connect('destroy', destroy)
main_window.add(i.vbox)

View File

@ -324,7 +324,7 @@ class fpdb:
def tab_bulk_import(self, widget, data):
"""opens a tab for bulk importing"""
#print "start of tab_bulk_import"
new_import_thread=GuiBulkImport.GuiBulkImport(self.db, self.settings, self.config)
new_import_thread=GuiBulkImport.GuiBulkImport(self.settings, self.config)
self.threads.append(new_import_thread)
bulk_tab=new_import_thread.get_vbox()
self.add_and_display_tab(bulk_tab, "Bulk Import")