From 30e9bea0198cf00b76dd356340458977ad9ae47c 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 35526e752..0fed1ec4e 100644 --- a/src/stratis_cli/_actions/_report_pool.py +++ b/src/stratis_cli/_actions/_report_pool.py @@ -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