aboutsummaryrefslogtreecommitdiffstats
path: root/src/resource_inventory/pdf_templater.py
diff options
context:
space:
mode:
authorSawyer Bergeron <sbergeron@iol.unh.edu>2020-10-12 16:51:35 -0400
committerSawyer Bergeron <sbergeron@iol.unh.edu>2020-10-15 13:22:37 -0400
commit7282289e63a9c2f5072b205cf41b8e979fd1d7e0 (patch)
tree1116db591384be04f785fbb371833050218cafe8 /src/resource_inventory/pdf_templater.py
parent8a06cdd7d55fabcc71d7034481f7b83ee94611cd (diff)
Add helper functions for booking specific hosts
Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu> Change-Id: Ib651a00ffb4e0aca9004397a61835cde01f6ccf3 Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu>
Diffstat (limited to 'src/resource_inventory/pdf_templater.py')
-rw-r--r--src/resource_inventory/pdf_templater.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/resource_inventory/pdf_templater.py b/src/resource_inventory/pdf_templater.py
index 86d84aa..c4b22fe 100644
--- a/src/resource_inventory/pdf_templater.py
+++ b/src/resource_inventory/pdf_templater.py
@@ -22,7 +22,11 @@ class PDFTemplater:
template = "dashboard/pdf.yaml"
info = {}
info['details'] = cls.get_pdf_details(booking.resource)
- info['jumphost'] = cls.get_pdf_jumphost(booking)
+ try:
+ info['jumphost'] = cls.get_pdf_jumphost(booking)
+ except Exception:
+ # filling in jumphost info can be optional in some cases, this shouldn't be a hard error
+ info['jumphost'] = {}
info['nodes'] = cls.get_pdf_nodes(booking)
return render_to_string(template, context=info)