Skip to content

zfs: return an empty dict if zfs/zpool commands are not available#1650

Merged
Fizzadar merged 2 commits intopyinfra-dev:3.xfrom
yacoob:3.x
Apr 4, 2026
Merged

zfs: return an empty dict if zfs/zpool commands are not available#1650
Fizzadar merged 2 commits intopyinfra-dev:3.xfrom
yacoob:3.x

Conversation

@yacoob
Copy link
Copy Markdown
Contributor

@yacoob yacoob commented Apr 2, 2026

If the required command is not installed, a default value is returned. FactsBase.default = None, which causes zfs.dataset to fail here.

With this PR in, both zfs.Pools and zfs.Datasets will return {} when the relevant binaries are missing.

  • Pull request is based on the default branch (3.x at this time)
  • Pull request includes tests for any new/updated operations/facts
  • Pull request includes documentation for any new/updated operations/facts
  • Tests pass (see scripts/dev-test.sh)
  • Type checking & code style passes (see scripts/dev-lint.sh)

@yacoob yacoob marked this pull request as ready for review April 2, 2026 02:40
@maisim
Copy link
Copy Markdown
Contributor

maisim commented Apr 2, 2026

Related to

#1647

Copy link
Copy Markdown
Member

@Fizzadar Fizzadar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh great spot @yacoob, thank you for fixing this!

@Fizzadar Fizzadar merged commit c15d1b1 into pyinfra-dev:3.x Apr 4, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants