Skip to content

Commit

Permalink
Merge pull request #43 from mmoll/vnc_keymap
Browse files Browse the repository at this point in the history
don't try to set a keymap when there's none
  • Loading branch information
plribeiro3000 committed Aug 15, 2017
2 parents 86b0a6e + 919ff01 commit b48397b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/fog/libvirt/requests/compute/update_display.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ def update_display(options = { })
display[:listen] = options[:listen].to_s if options[:listen]
display[:passwd] = options[:password].to_s if options[:password]
display[:autoport] = 'yes' if display[:port] == '-1'
display[:keymap] = options[:keymap] || xml_elements(domain.xml_desc, "graphics", "keymap")
new_keymap = options[:keymap] || xml_elements(domain.xml_desc, "graphics", "keymap")[0]
display[:keymap] = new_keymap unless new_keymap.nil?

builder = Nokogiri::XML::Builder.new { graphics_ (display) }
xml = Nokogiri::XML(builder.to_xml).root.to_s
Expand Down

0 comments on commit b48397b

Please sign in to comment.