aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/resource_inventory/pdf_templater.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/resource_inventory/pdf_templater.py b/src/resource_inventory/pdf_templater.py
index 9f7e7f1..a50f04c 100644
--- a/src/resource_inventory/pdf_templater.py
+++ b/src/resource_inventory/pdf_templater.py
@@ -154,8 +154,13 @@ class PDFTemplater:
iface_info['features'] = "none"
iface_info['mac_address'] = interface.mac_address
iface_info['name'] = interface.name
- profile = InterfaceProfile.objects.get(host=interface.host.profile, name=interface.name)
- iface_info['speed'] = str(int(profile.speed / 1000)) + "gb"
+ speed = "unknown"
+ try:
+ profile = InterfaceProfile.objects.get(host=interface.host.profile, name=interface.name)
+ speed = str(int(profile.speed / 1000)) + "gb"
+ except Exception:
+ pass
+ iface_info['speed'] = speed
return iface_info
@classmethod