1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-07-13 01:20:24 +02:00

add key-check to restore previous behavior even with non-df data

This commit is contained in:
Kelly Brazil
2021-11-17 12:03:40 -08:00
parent 85d9837616
commit 89a6d9c5c3

View File

@ -236,8 +236,9 @@ def parse(data, raw=False, quiet=False):
# replace hash values with real values to fix long filesystem data in some older versions of df
for item in raw_output:
if item['filesystem'] in filesystem_map:
item['filesystem'] = filesystem_map[item['filesystem']]
if 'filesystem' in item:
if item['filesystem'] in filesystem_map:
item['filesystem'] = filesystem_map[item['filesystem']]
if raw:
return raw_output