Skip to content

Commit 564f453

Browse files
committed
OD-1731: Don't store exceptions if we're not going to use them
1 parent 94aa44e commit 564f453

7 files changed

Lines changed: 7 additions & 7 deletions

File tree

efiction/metadata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ def fetch_coauthors(self, new_story, sql=None):
175175
# get a dict of coauthor IDs for the story
176176
try:
177177
authors = sql.execute_and_fetchall(self.working_original, full_query)
178-
except Exception as e:
178+
except Exception:
179179
authors = None
180180
self.logger.info("No coauthors table...")
181181
# We only try to operate on this result if it is not None

efiction/tag_converter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def check_for_nonstandard_tag_tables(self) -> bool:
5353
tags = list(map(lambda story_tags: story_tags[id_name].replace(',', ''), tags))
5454
int(''.join(tags))
5555
tag_tables[tag_table_name] = False
56-
except Exception as e:
56+
except Exception:
5757
# Non-integer in identifier
5858
tag_tables[tag_table_name] = True
5959
except Exception as e:

opendoors/mysql.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def read_table_to_dict(self, database: str, tablename: str):
7373
try:
7474
cursor.execute(f"SELECT * FROM {database}.{tablename};")
7575
return cursor.fetchall()
76-
except Exception as e:
76+
except Exception:
7777
self.logger.info(f"No table {tablename} in {database}...")
7878
return []
7979

opendoors/progress.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def continue_from_last(config: ConfigParser, logger: Logger, sql: SqlDb, steps:
3636
next_step = "01"
3737
else:
3838
run_next = False
39-
except Exception as e:
39+
except Exception:
4040
logger.error(traceback.format_exc())
4141

4242

opendoors/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def remove_output_files(path: str):
135135
shutil.rmtree(file)
136136
else:
137137
os.remove(file)
138-
except PermissionError as pe:
138+
except PermissionError:
139139
# We don't necessarily care that much
140140
continue
141141

steps/tests/test_step_01.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def tearDown(self) -> None:
2525
shutil.rmtree(file)
2626
else:
2727
os.remove(file)
28-
except PermissionError as pe:
28+
except PermissionError:
2929
# We don't necessarily care that much
3030
continue
3131

steps/tests/test_step_02.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def tearDown(self) -> None:
2525
shutil.rmtree(file)
2626
else:
2727
os.remove(file)
28-
except PermissionError as pe:
28+
except PermissionError:
2929
# We don't necessarily care that much
3030
continue
3131

0 commit comments

Comments
 (0)