Skip to content

Commit 712994b

Browse files
Ryan CaliRyan Cali
authored andcommitted
String formatting and flake8 issues resolved.
1 parent c0d62ff commit 712994b

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

pydra/engine/audit.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -184,17 +184,16 @@ def audit_task(self, task):
184184
# input_file = None
185185

186186
if command is not None:
187-
software = command.split()[0]
188-
software = software + " " + "--version"
187+
cmd_name = command.split()[0]
188+
software = f"{cmd_name} --version"
189189
# take the first word of command as the name of the executable (this may not always be the case)
190-
version_cmd = sp.run(software, shell=True, stdout=sp.PIPE).stdout.decode(
191-
"utf-8"
192-
)
190+
version_cmd = sp.run(software, shell=True,
191+
stdout=sp.PIPE).stdout.decode("utf-8")
193192
try:
194193
version_cmd = version_cmd.splitlines()[0]
195194

196195
except IndexError:
197-
version_cmd = None
196+
version_cmd = f"{cmd_name} -- Version unknown"
198197

199198
else:
200199
version_cmd = None

0 commit comments

Comments
 (0)