From f6180834dac443326b0b560c0b025c6eee1d7e88 Mon Sep 17 00:00:00 2001 From: Petruha Date: Thu, 30 Jun 2022 22:29:05 +0300 Subject: [PATCH] Fix bug #1 variable name collision --- dbf_to_sqlite/cli.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dbf_to_sqlite/cli.py b/dbf_to_sqlite/cli.py index 60278b0..ed7939c 100644 --- a/dbf_to_sqlite/cli.py +++ b/dbf_to_sqlite/cli.py @@ -23,9 +23,9 @@ def cli(dbf_paths, sqlite_db, table, verbose): table_name = table if table else Path(path).stem if verbose: click.echo('Loading {} into table "{}"'.format(path, table_name)) - table = dbf.Table(str(path)) - table.open() - columns = table.field_names - db[table_name].insert_all(dict(zip(columns, list(row))) for row in table) - table.close() + dbf_table = dbf.Table(str(path)) + dbf_table.open() + columns = dbf_table.field_names + db[table_name].insert_all(dict(zip(columns, list(row))) for row in dbf_table) + dbf_table.close() db.vacuum()