Skip to content
Snippets Groups Projects
Commit b00ec407 authored by payno's avatar payno
Browse files

improve partition name filtering

parent f0e4f2c0
No related branches found
No related tags found
No related merge requests found
......@@ -24,12 +24,12 @@ def get_partitions() -> tuple:
# sinfo -O partition
process = SubProcessCommand(command="sinfo -O partition")
try:
res = process.run()[1:] # First item is PARTITION
res = process.run()
except Exception:
pass
else:
return filter(
lambda x: x != "",
lambda x: x not in ("", "PARTITION"),
[str(line).replace(" ", "") for line in res.split("\n")],
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment