mirror of
https://github.com/qurator-spk/modstool.git
synced 2025-06-25 19:49:54 +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
|
||||
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'
|
||||
current_columns[table].append(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
|
||||
for caught_warning in caught_warnings:
|
||||
csvwriter.writerow([mets_file, caught_warning.message])
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
logger.exception("Exception in {}".format(mets_file))
|
||||
|
||||
logger.info("Writing DataFrame to {}".format(output_file))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue