diff --git a/pyfpdb/GuiBulkImport.py b/pyfpdb/GuiBulkImport.py index 915e9a39..d61fa2df 100755 --- a/pyfpdb/GuiBulkImport.py +++ b/pyfpdb/GuiBulkImport.py @@ -194,16 +194,10 @@ class GuiBulkImport(): self.load_button.show() # see how many hands are in the db and adjust accordingly - db_parms = config.get_db_parameters('fpdb') - db.connect(db_parms['db-backend'], - db_parms['db-host'], - db_parms['db-databaseName'], - db_parms['db-user'], - db_parms['db-password']) - cursor = db.db.cursor() - cursor.execute("Select max(id) from Hands;") - row = cursor.fetchone() - db.disconnect() # that's all we need this for + tcursor = db.db.cursor() + tcursor.execute("Select max(id) from Hands;") + row = tcursor.fetchone() + tcursor.close() self.n_hands_in_db = row[0] if self.n_hands_in_db == 0: self.cb.set_active(2) diff --git a/pyfpdb/Hud.py b/pyfpdb/Hud.py index 73dd3472..ed43bea2 100644 --- a/pyfpdb/Hud.py +++ b/pyfpdb/Hud.py @@ -142,7 +142,7 @@ class Hud: def update_table_position(self): if os.name == 'nt': if not win32gui.IsWindow(self.table.number): - self.kill_hud() + self.parent.kill_hud(self, self.table.name) return False # anyone know how to do this in unix, or better yet, trap the X11 error that is triggered when executing the get_origin() for a closed window?