Skip to content

Commit

Permalink
Avoid usage try/except for more readability
Browse files Browse the repository at this point in the history
  • Loading branch information
Ismail Ibrahim Quwarah committed Oct 7, 2024
1 parent 956c259 commit abab77c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tmt/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -776,10 +776,9 @@ def _fmf_id(self) -> None:
@property
def fmf_root(self) -> Optional[Path]:
# Check if fmf root exists
try:
if self.node.root is not None:
return Path(self.node.root)
except TypeError:
return None
return None

@property
def anchor_path(self) -> Path:
Expand Down

0 comments on commit abab77c

Please sign in to comment.