Skip to content

Commit

Permalink
(maint) Fix up nspooler list active bug
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Christopher Thorn committed Feb 8, 2022
1 parent ecf8925 commit 5793ea7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/vmfloaty/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def self.pretty_print_hosts(verbose, service, hostnames = [], print_to_stderr =
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
Expand Down

0 comments on commit 5793ea7

Please sign in to comment.