From ef9e8e33d6be2def06f7c30d64ab1b1b033c2a3b Mon Sep 17 00:00:00 2001 From: Peter Surda Date: Mon, 9 Dec 2024 16:14:24 +0800 Subject: [PATCH] Fix missing drive form factor --- agent.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/agent.py b/agent.py index c6489e9..60bd37f 100644 --- a/agent.py +++ b/agent.py @@ -135,7 +135,10 @@ class ServerData: details['transport'] = re.search(r'Transport:\s*(.*)', output).group(1) details['checksum'] = re.search(r'Checksum:\s*(.*)', output).group(1) details['buffer_size'] = re.search(r'cache/buffer size\s*=\s*(.*)', output).group(1) - details['form_factor'] = re.search(r'Form Factor:\s*(.*)', output).group(1) + try: + details['form_factor'] = re.search(r'Form Factor:\s*(.*)', output).group(1) + except AttributeError: + details['form_factor'] = "N/A" devices[device] = details