summaryrefslogtreecommitdiffstats
path: root/src/linux/ogOperations.py
diff options
context:
space:
mode:
authorJose M. Guisado <jguisado@soleta.eu>2023-07-21 09:49:24 +0200
committerJose M. Guisado <jguisado@soleta.eu>2023-07-21 11:55:25 +0200
commitee0d62db444441be41d99ac4ee5f2de5100cd934 (patch)
tree72a226395568a1a7b8a09bf5e005797e59fac849 /src/linux/ogOperations.py
parent035995fc8c55740693575ca5f7b408bfc46c1f7d (diff)
hw_inventory: use dict.get
The first stage of parsing the "lshw -json" command output is to load the json string into a Python dictionary. lshw output is large and varies from machine to machine, so it's not safe to assume that different keys will be present in the dictionary. Use dict.get() instead of dict[key] to avoid KeyError exceptions.
Diffstat (limited to 'src/linux/ogOperations.py')
0 files changed, 0 insertions, 0 deletions