Skip to content

Commit

Permalink
Delete unnecessary condition
Browse files Browse the repository at this point in the history
If the `excepted_path` is not None, it will must be a exists path
  • Loading branch information
WangGithubUser committed Sep 9, 2023
1 parent d6fac87 commit 7e6afcb
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions client/configuration/search_path.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,8 @@ def add_if_exists(element: Element) -> bool:
excepted_path = element.path()
if excepted_path is None:
return False
if os.path.exists(excepted_path):
elements.append(element)
return True
return False
elements.append(element)
return True

for raw_element in raw_elements:
expanded_raw_elements = raw_element.expand_glob()
Expand Down

0 comments on commit 7e6afcb

Please sign in to comment.