Commit 3a8379a7 authored by Nigel Kukard's avatar Nigel Kukard
Browse files

Cleaned up blkid attribute dict

parent a1cdd712
......@@ -38,6 +38,9 @@ class Blkid:
raise OSError(f'Failed to get blkid attributes from device {device} return code {proc.retcode}')
# Strip value, then split on the =
attribs = dict(x.rstrip().split('=', 1) for x in result)
attribs: Dict[str, str] = {}
for line in result:
key, value = line.rstrip().split('=', 1)
attribs[key] = value
return attribs
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment