Skip to content

Commit 5793ea7

Browse files
author
Christopher Thorn
committed
(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.
1 parent ecf8925 commit 5793ea7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: lib/vmfloaty/utils.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def self.pretty_print_hosts(verbose, service, hostnames = [], print_to_stderr =
144144
when 'NonstandardPooler'
145145
line = "- #{host_data['fqdn']} (#{host_data['os_triple']}"
146146
line += ", #{host_data['hours_left_on_reservation']}h remaining"
147-
line += ", reason: #{host_data['reserved_for_reason']}" unless host_data['reserved_for_reason'].empty?
147+
line += ", reason: #{host_data['reserved_for_reason']}" unless host_data['reserved_for_reason'].nil? || host_data['reserved_for_reason'].empty?
148148
line += ')'
149149
output_target.puts line
150150
else

0 commit comments

Comments
 (0)