summaryrefslogtreecommitdiffstats
path: root/dump.py
diff options
context:
space:
mode:
Diffstat (limited to 'dump.py')
-rw-r--r--dump.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/dump.py b/dump.py
index 4464823..4b8c395 100644
--- a/dump.py
+++ b/dump.py
@@ -46,11 +46,11 @@ def _iterdump(connection):
# qtable,
# sql.replace("''")))
else:
- yield('{0};'.format(sql))
+ yield(f'{sql};')
# Build the insert statement for each row of the current table
table_name_ident = table_name.replace('"', '""')
- res = cu.execute('PRAGMA table_info("{0}")'.format(table_name_ident))
+ res = cu.execute(f'PRAGMA table_info("{table_name_ident}")')
column_names = [str(table_info[1]) for table_info in res.fetchall()]
q = """SELECT 'INSERT INTO "{0}" VALUES({1})' FROM "{0}";""".format(
table_name_ident,
@@ -68,6 +68,6 @@ def _iterdump(connection):
"""
schema_res = cu.execute(q)
for name, type, sql in schema_res.fetchall():
- yield('{0};'.format(sql))
+ yield(f'{sql};')
yield('COMMIT;') \ No newline at end of file