Skip to content

Commit

Permalink
Use list comprehension for stopped pool lsblk
Browse files Browse the repository at this point in the history
  • Loading branch information
bgurney-rh committed Aug 9, 2023
1 parent e99da14 commit c26b8d5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/stratis_cli/_actions/_report_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,7 @@ def selection_func(_uuid, info):

# Ignore bandit B603 errors. Input comes from D-Bus and has
# been processed.
blkdevs = [dev[dbus.String("devnode")] for dev in stopped_pool["devs"]]
for dev in stopped_pool["devs"]:
print(dev[dbus.String("devnode")])
subprocess.run(
["/usr/bin/lsblk", "-i", dev[dbus.String("devnode")]], check=True
) # nosec B603
subprocess.run(["/usr/bin/lsblk", "-i"] + blkdevs, check=True) # nosec B603

0 comments on commit c26b8d5

Please sign in to comment.