Skip to content

Commit e03afd8

Browse files
Delete unnecessary condition
If the `excepted_path` is not None, it will must be a exists path
1 parent 93863db commit e03afd8

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

client/configuration/search_path.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -277,10 +277,8 @@ def add_if_exists(element: Element) -> bool:
277277
excepted_path = element.path()
278278
if excepted_path is None:
279279
return False
280-
if os.path.exists(excepted_path):
281-
elements.append(element)
282-
return True
283-
return False
280+
elements.append(element)
281+
return True
284282

285283
for raw_element in raw_elements:
286284
expanded_raw_elements = raw_element.expand_glob()

0 commit comments

Comments
 (0)