Skip to content

Commit

Permalink
chore: fix schema tool source layout check return code handling
Browse files Browse the repository at this point in the history
  • Loading branch information
jjaakola-aiven committed Oct 16, 2024
1 parent 458b1a6 commit 5d53ded
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/karapace/backup/backends/v3/schema_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,10 @@ def relative_path(path: pathlib.Path) -> pathlib.Path:


def target_has_source_layout(git_target: str) -> bool:
with subprocess.Popen(
["git", "show", f"{git_target}:src"],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
) as cp:
if cp.returncode == 128:
return False
return True
cp = subprocess.run(["git", "show", f"{git_target}:src"], capture_output=True)
if cp.returncode == 128:
return False
return True


def check_compatibility(git_target: str) -> None:
Expand Down

0 comments on commit 5d53ded

Please sign in to comment.