mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Consolidation suggested by Wesley Beary
This commit is contained in:
parent
5c74409f03
commit
2ff10ab35e
1 changed files with 2 additions and 4 deletions
|
@ -23,10 +23,8 @@ module Fog
|
|||
|
||||
def get(server_id)
|
||||
servers = service.list_virtual_machines('id' => server_id)["listvirtualmachinesresponse"]["virtualmachine"]
|
||||
if ! servers.nil?
|
||||
if server = servers.first
|
||||
new(server)
|
||||
end
|
||||
unless servers.empty?
|
||||
new(servers.first)
|
||||
end
|
||||
rescue Fog::Compute::Cloudstack::BadRequest
|
||||
nil
|
||||
|
|
Loading…
Add table
Reference in a new issue