From 5793ea78b908c454a250af8fbbf037a887864c71 Mon Sep 17 00:00:00 2001 From: Christopher Thorn Date: Tue, 8 Feb 2022 11:53:55 -0800 Subject: [PATCH] (maint) Fix up nspooler list active bug If no reason is defined for checking out a nspooler VM we'd get a nil refrence error message when listing active nspooler VMs. This PR fixes that. --- lib/vmfloaty/utils.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vmfloaty/utils.rb b/lib/vmfloaty/utils.rb index c1c4577..bfd4a4a 100644 --- a/lib/vmfloaty/utils.rb +++ b/lib/vmfloaty/utils.rb @@ -144,7 +144,7 @@ class Utils when 'NonstandardPooler' line = "- #{host_data['fqdn']} (#{host_data['os_triple']}" line += ", #{host_data['hours_left_on_reservation']}h remaining" - line += ", reason: #{host_data['reserved_for_reason']}" unless host_data['reserved_for_reason'].empty? + line += ", reason: #{host_data['reserved_for_reason']}" unless host_data['reserved_for_reason'].nil? || host_data['reserved_for_reason'].empty? line += ')' output_target.puts line else