Skip to content

Commit

Permalink
Fix stopped pool report command
Browse files Browse the repository at this point in the history
  • Loading branch information
bgurney-rh committed Aug 8, 2023
1 parent 081e8ed commit e99da14
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/stratis_cli/_actions/_report_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
import subprocess
from abc import ABC, abstractmethod

# isort: THIRDPARTY
import dbus

from .._errors import StratisCliResourceNotFoundError
from .._stratisd_constants import PoolIdType
from ._connection import get_object
Expand Down Expand Up @@ -158,5 +161,7 @@ def selection_func(_uuid, info):
# Ignore bandit B603 errors. Input comes from D-Bus and has
# been processed.
for dev in stopped_pool["devs"]:
print(dev)
subprocess.run(["/usr/bin/lsblk", "-i", str(dev)], check=True) # nosec B603
print(dev[dbus.String("devnode")])
subprocess.run(
["/usr/bin/lsblk", "-i", dev[dbus.String("devnode")]], check=True
) # nosec B603

0 comments on commit e99da14

Please sign in to comment.