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 authored and mulkieran committed Dec 4, 2023
1 parent 8b8f080 commit 30e9bea
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 @@ -138,8 +138,7 @@ def report_pool(self):

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

0 comments on commit 30e9bea

Please sign in to comment.