mirror of
https://github.com/qurator-spk/modstool.git
synced 2025-06-26 03:59:55 +02:00
🎨 Remove unused var + use 'not in'
This commit is contained in:
parent
003c8d77b9
commit
01c1762d32
2 changed files with 2 additions and 2 deletions
|
@ -356,7 +356,7 @@ def insert_into_db(con, table, d: Dict):
|
||||||
|
|
||||||
# Add columns if necessary
|
# Add columns if necessary
|
||||||
for k in d.keys():
|
for k in d.keys():
|
||||||
if not k in current_columns[table]:
|
if k not in current_columns[table]:
|
||||||
assert valid_column_key(k), f'"{k}" is not a valid column name'
|
assert valid_column_key(k), f'"{k}" is not a valid column name'
|
||||||
current_columns[table].append(k)
|
current_columns[table].append(k)
|
||||||
con.execute(f'ALTER TABLE {table} ADD COLUMN "{k}"')
|
con.execute(f'ALTER TABLE {table} ADD COLUMN "{k}"')
|
||||||
|
|
|
@ -601,7 +601,7 @@ def process(mets_files: list[str], output_file: str, output_page_info: str):
|
||||||
# noinspection PyTypeChecker
|
# noinspection PyTypeChecker
|
||||||
for caught_warning in caught_warnings:
|
for caught_warning in caught_warnings:
|
||||||
csvwriter.writerow([mets_file, caught_warning.message])
|
csvwriter.writerow([mets_file, caught_warning.message])
|
||||||
except Exception as e:
|
except Exception:
|
||||||
logger.exception("Exception in {}".format(mets_file))
|
logger.exception("Exception in {}".format(mets_file))
|
||||||
|
|
||||||
logger.info("Writing DataFrame to {}".format(output_file))
|
logger.info("Writing DataFrame to {}".format(output_file))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue