Skip to content

Commit

Permalink
fix empty try except
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonykim1 committed Aug 3, 2023
1 parent 35c28c5 commit 6406c6d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pythonFiles/installed_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def parse_requirements(line: str) -> Optional[Requirement]:
return req
elif req.marker.evaluate():
return req
except:
except Exception:
return None


Expand All @@ -51,7 +51,7 @@ def process_requirements(req_file: pathlib.Path) -> List[Dict[str, Union[str, in
try:
# Check if package is installed
metadata(req.name)
except:
except Exception:
diagnostics.append(
{
"line": n,
Expand Down Expand Up @@ -79,7 +79,7 @@ def process_pyproject(req_file: pathlib.Path) -> List[Dict[str, Union[str, int]]
try:
raw_text = req_file.read_text(encoding="utf-8")
pyproject = tomli.loads(raw_text)
except:
except Exception:
return diagnostics

lines = raw_text.splitlines()
Expand All @@ -91,7 +91,7 @@ def process_pyproject(req_file: pathlib.Path) -> List[Dict[str, Union[str, int]]
try:
# Check if package is installed
metadata(req.name)
except:
except Exception:
diagnostics.append(
{
"line": n,
Expand Down

0 comments on commit 6406c6d

Please sign in to comment.