Skip to content

Commit

Permalink
Merge pull request #1125 from mulkieran/use-metadata-version-enum
Browse files Browse the repository at this point in the history
Use MetadataVersion enum for printing pool detail view
  • Loading branch information
mulkieran authored Jan 16, 2025
2 parents 0f0c0ee + 04ef235 commit ac1b7c1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/stratis_cli/_actions/_list_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,14 @@ def _print_detail_view(self, mopool, size_change_codes):
for line in alert_summary: # pragma: no cover
print(f" {line}")

print(f"Metadata Version: {mopool.MetadataVersion()}")
try:
metadata_version = MetadataVersion(int(mopool.MetadataVersion()))
except ValueError: # pragma: no cover
metadata_version = None

print(
f'Metadata Version: {"none" if metadata_version is None else metadata_version}'
)

print(
f"Actions Allowed: "
Expand Down

0 comments on commit ac1b7c1

Please sign in to comment.