From c26b8d5552a7688e7f74eda6ab8a87a786b419b4 Mon Sep 17 00:00:00 2001 From: Bryan Gurney Date: Wed, 9 Aug 2023 14:18:58 -0400 Subject: [PATCH] Use list comprehension for stopped pool lsblk --- src/stratis_cli/_actions/_report_pool.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/stratis_cli/_actions/_report_pool.py b/src/stratis_cli/_actions/_report_pool.py index 619f44f5c..1867c9b24 100644 --- a/src/stratis_cli/_actions/_report_pool.py +++ b/src/stratis_cli/_actions/_report_pool.py @@ -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