Skip to content

Commit

Permalink
Add workaround to detect feature plugin playbook
Browse files Browse the repository at this point in the history
  • Loading branch information
Ismail Ibrahim Quwarah authored and happz committed Jan 13, 2025
1 parent 686d3bc commit d0d9bca
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tmt/steps/prepare/feature/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import dataclasses
import inspect
from typing import Callable, Optional, cast

import tmt
Expand Down Expand Up @@ -84,6 +85,10 @@ def _find_playbook(cls, filename: str, logger: tmt.log.Logger) -> Optional[Path]
if filepath.exists():
return filepath

filepath = Path(inspect.getfile(cls)).parent / filename
if filepath.exists():
return filepath

logger.warning(f"Cannot find any suitable playbook for '{filename}'.", 0)
return None

Expand Down

0 comments on commit d0d9bca

Please sign in to comment.