Skip to content

Commit

Permalink
containers: Handle empty paths in configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
spoutn1k committed Feb 8, 2023
1 parent 24e4f1d commit 7b57fd4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions e4s_cl/cf/containers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ def _executable(self) -> Optional[Path]:

def _valid_executable(path: Path) -> bool:
# Check for executable status ?
return path.exists()
return path.exists() and path.is_file()

container_type_id = getattr(self, 'name', None)
if container_type_id is None or not isinstance(container_type_id, str):
Expand All @@ -314,7 +314,7 @@ def _valid_executable(path: Path) -> bool:
marker = f"{container_type_id}_executable"

def _check(path: str, origin: str, marker: str) -> bool:
if path is None:
if not path:
return False

path = Path(path)
Expand Down

0 comments on commit 7b57fd4

Please sign in to comment.